home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW etc / MPW-GM / MPW / Examples / PPCExamples / International Example / InlineInputSample / TE 27 Inline Input & Text Edit < prev   
MacBinary  |  1998-12-03  |  91.6 KB  |  [ONLN/HLX2]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
100% file MacBinary II, inited, Thu Sep 21 08:00:00 1995, modified Thu Dec 3 07:00:00 1998, creator 'HLX2', type 'ONLN', 90905 bytes "TE 27 Inline Input & Text Edit" , at 0x16399 2579 bytes resource default (weak)
99% file data default
100% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[ONLN]
macFileCreator[HLX2]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 1e 54 45 20 32 37 20 | 49 6e 6c 69 6e 65 20 49 |..TE 27 |Inline I|
|00000010| 6e 70 75 74 20 26 20 54 | 65 78 74 20 45 64 69 74 |nput & T|ext Edit|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 01 63 19 00 | 00 0a 13 ac 87 04 40 b2 |.....c..|......@.|
|00000060| 8c 2d c0 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.-......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 35 f7 00 00 |........|....5...|
|00000080| 54 45 20 32 37 20 d0 20 | 49 6e 6c 69 6e 65 20 49 |TE 27 . |Inline I|
|00000090| 6e 70 75 74 20 66 6f 72 | 20 54 65 78 74 45 64 69 |nput for| TextEdi|
|000000a0| 74 20 77 69 74 68 20 54 | 53 4d 54 45 0d 54 65 78 |t with T|SMTE.Tex|
|000000b0| 74 0d 57 72 69 74 74 65 | 6e 20 62 79 3a 09 59 61 |t.Writte|n by:.Ya|
|000000c0| 73 75 6f 20 4b 69 64 61 | 2c 20 4b 65 69 73 75 6b |suo Kida|, Keisuk|
|000000d0| 65 20 48 61 72 61 2c 20 | 4e 6f 62 75 68 69 72 6f |e Hara, |Nobuhiro|
|000000e0| 20 4d 69 79 61 74 61 6b | 65 2c 09 44 65 63 65 6d | Miyatak|e,.Decem|
|000000f0| 62 65 72 20 31 39 39 33 | 0d 09 09 50 65 74 65 72 |ber 1993|...Peter|
|00000100| 20 53 70 61 72 6b 73 2c | 20 4e 6f 72 62 65 72 74 | Sparks,| Norbert|
|00000110| 20 4c 69 6e 64 65 6e 62 | 65 72 67 0d 54 68 69 73 | Lindenb|erg.This|
|00000120| 20 54 65 63 68 6e 69 63 | 61 6c 20 4e 6f 74 65 20 | Technic|al Note |
|00000130| 64 65 73 63 72 69 62 65 | 73 20 54 53 4d 54 45 2c |describe|s TSMTE,|
|00000140| 20 61 6e 20 65 78 74 65 | 6e 73 69 6f 6e 20 74 68 | an exte|nsion th|
|00000150| 61 74 20 73 69 6d 70 6c | 69 66 69 65 73 20 69 6d |at simpl|ifies im|
|00000160| 70 6c 65 6d 65 6e 74 61 | 74 69 6f 6e 20 6f 66 20 |plementa|tion of |
|00000170| 69 6e 6c 69 6e 65 20 69 | 6e 70 75 74 20 66 6f 72 |inline i|nput for|
|00000180| 20 54 65 78 74 45 64 69 | 74 20 75 73 69 6e 67 20 | TextEdi|t using |
|00000190| 74 68 65 20 54 65 78 74 | 20 53 65 72 76 69 63 65 |the Text| Service|
|000001a0| 73 20 4d 61 6e 61 67 65 | 72 20 69 6e 20 53 79 73 |s Manage|r in Sys|
|000001b0| 74 65 6d 20 37 2e 31 20 | 61 6e 64 20 6c 61 74 65 |tem 7.1 |and late|
|000001c0| 72 2c 20 61 6e 64 20 73 | 68 6f 77 73 20 79 6f 75 |r, and s|hows you|
|000001d0| 20 68 6f 77 20 74 6f 20 | 6d 61 6b 65 20 74 68 65 | how to |make the|
|000001e0| 20 62 65 73 74 20 75 73 | 65 20 6f 66 20 69 74 2e | best us|e of it.|
|000001f0| 20 49 74 20 61 6c 73 6f | 20 63 6f 6e 74 61 69 6e | It also| contain|
|00000200| 73 20 73 6f 6d 65 20 61 | 64 76 69 63 65 20 66 6f |s some a|dvice fo|
|00000210| 72 20 77 6f 72 6b 69 6e | 67 20 77 69 74 68 20 74 |r workin|g with t|
|00000220| 68 65 20 54 65 78 74 20 | 53 65 72 76 69 63 65 73 |he Text |Services|
|00000230| 20 4d 61 6e 61 67 65 72 | 20 74 68 61 74 20 61 70 | Manager| that ap|
|00000240| 70 6c 69 65 73 20 74 6f | 20 61 6e 79 20 61 70 70 |plies to| any app|
|00000250| 6c 69 63 61 74 69 6f 6e | 20 75 73 69 6e 67 20 54 |lication| using T|
|00000260| 53 4d 2c 20 6e 6f 74 20 | 6a 75 73 74 20 74 68 6f |SM, not |just tho|
|00000270| 73 65 20 75 73 69 6e 67 | 20 54 53 4d 54 45 2e 0d |se using| TSMTE..|
|00000280| 54 6f 70 69 63 73 0d a5 | 20 57 68 61 74 20 69 73 |Topics..| What is|
|00000290| 20 54 53 4d 54 45 0d a5 | 20 57 68 65 72 65 20 61 | TSMTE..| Where a|
|000002a0| 6e 64 20 68 6f 77 20 69 | 73 20 54 53 4d 54 45 20 |nd how i|s TSMTE |
|000002b0| 64 65 6c 69 76 65 72 65 | 64 0d a5 20 48 6f 77 20 |delivere|d.. How |
|000002c0| 69 73 20 54 53 4d 54 45 | 20 75 73 65 64 20 69 6e |is TSMTE| used in|
|000002d0| 20 61 6e 20 61 70 70 6c | 69 63 61 74 69 6f 6e 0d | an appl|ication.|
|000002e0| a5 20 41 64 76 69 63 65 | 20 66 6f 72 20 77 6f 72 |. Advice| for wor|
|000002f0| 6b 69 6e 67 20 77 69 74 | 68 20 74 68 65 20 54 65 |king wit|h the Te|
|00000300| 78 74 20 53 65 72 76 69 | 63 65 73 20 4d 61 6e 61 |xt Servi|ces Mana|
|00000310| 67 65 72 0d 49 6e 74 72 | 6f 64 75 63 74 69 6f 6e |ger.Intr|oduction|
|00000320| 0d 53 79 73 74 65 6d 20 | 37 2e 31 20 69 6e 74 72 |.System |7.1 intr|
|00000330| 6f 64 75 63 65 64 20 61 | 20 6e 65 77 20 54 6f 6f |oduced a| new Too|
|00000340| 6c 62 6f 78 20 6d 61 6e | 61 67 65 72 2c 20 74 68 |lbox man|ager, th|
|00000350| 65 20 54 65 78 74 20 53 | 65 72 76 69 63 65 73 20 |e Text S|ervices |
|00000360| 4d 61 6e 61 67 65 72 2c | 20 74 68 61 74 20 6d 61 |Manager,| that ma|
|00000370| 6b 65 73 20 69 74 20 65 | 61 73 69 65 72 20 66 6f |kes it e|asier fo|
|00000380| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 73 20 74 |r applic|ations t|
|00000390| 6f 20 70 72 6f 76 69 64 | 65 20 69 6e 6c 69 6e 65 |o provid|e inline|
|000003a0| 20 69 6e 70 75 74 20 66 | 6f 72 20 32 2d 62 79 74 | input f|or 2-byt|
|000003b0| 65 20 73 63 72 69 70 74 | 20 73 79 73 74 65 6d 73 |e script| systems|
|000003c0| 20 28 73 65 65 20 49 6e | 73 69 64 65 20 4d 61 63 | (see In|side Mac|
|000003d0| 69 6e 74 6f 73 68 3a 20 | 54 65 78 74 2c 20 70 61 |intosh: |Text, pa|
|000003e0| 67 65 73 20 37 2d 36 20 | 74 6f 20 37 2d 31 32 2c |ges 7-6 |to 7-12,|
|000003f0| 20 66 6f 72 20 61 6e 20 | 6f 76 65 72 76 69 65 77 | for an |overview|
|00000400| 29 2e 20 54 6f 20 69 6d | 70 6c 65 6d 65 6e 74 20 |). To im|plement |
|00000410| 69 6e 6c 69 6e 65 20 69 | 6e 70 75 74 20 75 73 69 |inline i|nput usi|
|00000420| 6e 67 20 74 68 65 20 54 | 65 78 74 20 53 65 72 76 |ng the T|ext Serv|
|00000430| 69 63 65 73 20 4d 61 6e | 61 67 65 72 2c 20 61 6e |ices Man|ager, an|
|00000440| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 68 61 73 | applica|tion has|
|00000450| 20 74 6f 20 64 6f 20 74 | 77 6f 20 74 68 69 6e 67 | to do t|wo thing|
|00000460| 73 3a 20 6d 61 6b 65 20 | 73 6f 6d 65 20 63 61 6c |s: make |some cal|
|00000470| 6c 73 20 74 6f 20 74 68 | 65 20 54 65 78 74 20 53 |ls to th|e Text S|
|00000480| 65 72 76 69 63 65 73 20 | 4d 61 6e 61 67 65 72 20 |ervices |Manager |
|00000490| 69 6e 20 74 68 65 20 72 | 69 67 68 74 20 70 6c 61 |in the r|ight pla|
|000004a0| 63 65 73 2c 20 61 6e 64 | 20 70 72 6f 76 69 64 65 |ces, and| provide|
|000004b0| 20 41 70 70 6c 65 20 65 | 76 65 6e 74 20 68 61 6e | Apple e|vent han|
|000004c0| 64 6c 65 72 73 20 74 68 | 61 74 20 72 65 73 70 6f |dlers th|at respo|
|000004d0| 6e 64 20 74 6f 20 65 76 | 65 6e 74 73 20 66 72 6f |nd to ev|ents fro|
|000004e0| 6d 20 69 6e 70 75 74 20 | 6d 65 74 68 6f 64 73 20 |m input |methods |
|000004f0| 62 79 20 75 70 64 61 74 | 69 6e 67 20 74 65 78 74 |by updat|ing text|
|00000500| 20 64 61 74 61 20 73 74 | 72 75 63 74 75 72 65 73 | data st|ructures|
|00000510| 2c 20 64 69 73 70 6c 61 | 79 69 6e 67 20 74 65 78 |, displa|ying tex|
|00000520| 74 2c 20 61 6e 64 20 74 | 72 61 6e 73 6c 61 74 69 |t, and t|ranslati|
|00000530| 6e 67 20 74 65 78 74 20 | 6f 66 66 73 65 74 73 20 |ng text |offsets |
|00000540| 61 6e 64 20 73 63 72 65 | 65 6e 20 63 6f 6f 72 64 |and scre|en coord|
|00000550| 69 6e 61 74 65 73 2e 20 | 54 68 65 20 66 69 72 73 |inates. |The firs|
|00000560| 74 20 70 61 72 74 20 69 | 73 20 65 61 73 79 20 28 |t part i|s easy (|
|00000570| 6d 61 79 62 65 20 35 30 | 2d 31 30 30 20 6c 69 6e |maybe 50|-100 lin|
|00000580| 65 73 20 6f 66 20 63 6f | 64 65 29 2c 20 74 68 65 |es of co|de), the|
|00000590| 20 73 65 63 6f 6e 64 20 | 70 61 72 74 20 63 61 6e | second |part can|
|000005a0| 2c 20 64 65 70 65 6e 64 | 69 6e 67 20 6f 6e 20 74 |, depend|ing on t|
|000005b0| 68 65 20 63 6f 6d 70 6c | 65 78 69 74 79 20 6f 66 |he compl|exity of|
|000005c0| 20 74 68 65 20 74 65 78 | 74 20 65 6e 67 69 6e 65 | the tex|t engine|
|000005d0| 20 74 68 61 74 20 79 6f | 75 20 75 73 65 2c 20 72 | that yo|u use, r|
|000005e0| 65 71 75 69 72 65 20 73 | 75 62 73 74 61 6e 74 69 |equire s|ubstanti|
|000005f0| 61 6c 20 77 6f 72 6b 20 | 28 73 65 76 65 72 61 6c |al work |(several|
|00000600| 20 68 75 6e 64 72 65 64 | 20 74 6f 20 74 68 6f 75 | hundred| to thou|
|00000610| 73 61 6e 64 73 20 6f 66 | 20 6c 69 6e 65 73 20 6f |sands of| lines o|
|00000620| 66 20 63 6f 64 65 29 2e | 0d 54 53 4d 54 45 20 69 |f code).|.TSMTE i|
|00000630| 73 20 61 6e 20 65 78 74 | 65 6e 73 69 6f 6e 20 74 |s an ext|ension t|
|00000640| 6f 20 74 68 65 20 54 65 | 78 74 20 53 65 72 76 69 |o the Te|xt Servi|
|00000650| 63 65 73 20 4d 61 6e 61 | 67 65 72 20 74 68 61 74 |ces Mana|ger that|
|00000660| 20 64 6f 65 73 20 74 68 | 65 20 73 65 63 6f 6e 64 | does th|e second|
|00000670| 20 70 61 72 74 20 6f 66 | 20 74 68 65 20 77 6f 72 | part of| the wor|
|00000680| 6b 20 66 6f 72 20 79 6f | 75 20 69 66 20 79 6f 75 |k for yo|u if you|
|00000690| 20 75 73 65 20 54 65 78 | 74 45 64 69 74 2e 20 49 | use Tex|tEdit. I|
|000006a0| 74 20 70 72 6f 76 69 64 | 65 73 20 41 70 70 6c 65 |t provid|es Apple|
|000006b0| 20 65 76 65 6e 74 20 68 | 61 6e 64 6c 65 72 73 20 | event h|andlers |
|000006c0| 74 68 61 74 20 68 61 6e | 64 6c 65 20 61 6c 6c 20 |that han|dle all |
|000006d0| 69 6e 74 65 72 61 63 74 | 69 6f 6e 73 20 62 65 74 |interact|ions bet|
|000006e0| 77 65 65 6e 20 61 6e 20 | 69 6e 70 75 74 20 6d 65 |ween an |input me|
|000006f0| 74 68 6f 64 20 61 6e 64 | 20 54 65 78 74 45 64 69 |thod and| TextEdi|
|00000700| 74 2e 20 54 68 65 20 68 | 61 6e 64 6c 65 72 73 20 |t. The h|andlers |
|00000710| 61 72 65 20 6b 65 70 74 | 20 69 6e 20 74 68 65 20 |are kept| in the |
|00000720| 73 79 73 74 65 6d 20 68 | 65 61 70 2c 20 73 6f 20 |system h|eap, so |
|00000730| 74 68 65 79 20 61 72 65 | 20 73 68 61 72 65 64 20 |they are| shared |
|00000740| 62 65 74 77 65 65 6e 20 | 61 6c 6c 20 61 70 70 6c |between |all appl|
|00000750| 69 63 61 74 69 6f 6e 73 | 2e 0d 54 53 4d 54 45 20 |ications|..TSMTE |
|00000760| 74 68 75 73 20 63 61 6e | 20 72 65 64 75 63 65 20 |thus can| reduce |
|00000770| 74 68 65 20 65 66 66 6f | 72 74 20 6e 65 65 64 65 |the effo|rt neede|
|00000780| 64 20 74 6f 20 69 6d 70 | 6c 65 6d 65 6e 74 20 69 |d to imp|lement i|
|00000790| 6e 6c 69 6e 65 20 69 6e | 70 75 74 20 74 6f 20 61 |nline in|put to a|
|000007a0| 20 64 61 79 20 6f 72 20 | 74 77 6f 2e 20 49 66 20 | day or |two. If |
|000007b0| 79 6f 75 20 75 73 65 20 | 54 65 78 74 45 64 69 74 |you use |TextEdit|
|000007c0| 20 69 6e 20 64 6f 63 75 | 6d 65 6e 74 73 20 6f 72 | in docu|ments or|
|000007d0| 20 6d 6f 64 65 6c 65 73 | 73 20 64 69 61 6c 6f 67 | modeles|s dialog|
|000007e0| 73 2c 20 79 6f 75 20 68 | 61 76 65 20 74 6f 20 6d |s, you h|ave to m|
|000007f0| 61 6b 65 20 61 20 66 65 | 77 20 63 61 6c 6c 73 20 |ake a fe|w calls |
|00000800| 74 6f 20 54 53 4d 54 45 | 20 69 6e 20 65 78 63 68 |to TSMTE| in exch|
|00000810| 61 6e 67 65 20 66 6f 72 | 20 69 74 73 20 68 65 6c |ange for| its hel|
|00000820| 70 3b 20 69 66 20 79 6f | 75 20 75 73 65 20 54 65 |p; if yo|u use Te|
|00000830| 78 74 45 64 69 74 20 6f | 6e 6c 79 20 69 6e 20 6d |xtEdit o|nly in m|
|00000840| 6f 64 61 6c 20 64 69 61 | 6c 6f 67 73 2c 20 79 6f |odal dia|logs, yo|
|00000850| 75 20 6f 6e 6c 79 20 68 | 61 76 65 20 74 6f 20 6d |u only h|ave to m|
|00000860| 6f 64 69 66 79 20 74 68 | 65 20 44 4c 4f 47 20 72 |odify th|e DLOG r|
|00000870| 65 73 6f 75 72 63 65 73 | 20 74 68 61 74 20 64 65 |esources| that de|
|00000880| 66 69 6e 65 20 74 68 65 | 6d 2e 0d 49 66 20 79 6f |fine the|m..If yo|
|00000890| 75 20 75 73 65 20 61 20 | 74 65 78 74 20 65 6e 67 |u use a |text eng|
|000008a0| 69 6e 65 20 6f 74 68 65 | 72 20 74 68 61 6e 20 54 |ine othe|r than T|
|000008b0| 65 78 74 45 64 69 74 20 | 66 6f 72 20 65 64 69 74 |extEdit |for edit|
|000008c0| 69 6e 67 20 69 6e 20 79 | 6f 75 72 20 61 70 70 6c |ing in y|our appl|
|000008d0| 69 63 61 74 69 6f 6e 2c | 20 79 6f 75 20 63 61 6e |ication,| you can|
|000008e0| 20 73 74 69 6c 6c 20 75 | 73 65 20 54 53 4d 54 45 | still u|se TSMTE|
|000008f0| 20 74 6f 20 68 61 6e 64 | 6c 65 20 69 6e 6c 69 6e | to hand|le inlin|
|00000900| 65 20 69 6e 70 75 74 20 | 77 68 65 72 65 76 65 72 |e input |wherever|
|00000910| 20 79 6f 75 20 75 73 65 | 20 54 65 78 74 45 64 69 | you use| TextEdi|
|00000920| 74 2c 20 65 2e 67 2e 2c | 20 69 6e 20 64 69 61 6c |t, e.g.,| in dial|
|00000930| 6f 67 73 2e 0d 4e 6f 74 | 65 3a 09 4b 61 6e 6a 69 |ogs..Not|e:.Kanji|
|00000940| 54 61 6c 6b 20 36 2e 30 | 2e 37 20 68 61 64 20 61 |Talk 6.0|.7 had a|
|00000950| 6e 20 65 78 74 65 6e 73 | 69 6f 6e 20 74 68 61 74 |n extens|ion that|
|00000960| 20 70 72 6f 76 69 64 65 | 64 20 66 75 6c 6c 79 20 | provide|d fully |
|00000970| 61 75 74 6f 6d 61 74 69 | 63 20 73 75 70 70 6f 72 |automati|c suppor|
|00000980| 74 20 66 6f 72 20 69 6e | 6c 69 6e 65 20 69 6e 70 |t for in|line inp|
|00000990| 75 74 20 77 69 74 68 20 | 54 65 78 74 45 64 69 74 |ut with |TextEdit|
|000009a0| 20 77 69 74 68 6f 75 74 | 20 61 6e 79 20 6b 69 6e | without| any kin|
|000009b0| 64 20 6f 66 20 6d 6f 64 | 69 66 69 63 61 74 69 6f |d of mod|ificatio|
|000009c0| 6e 20 74 6f 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |n to app|lication|
|000009d0| 73 2e 20 57 69 74 68 20 | 54 53 4d 54 45 2c 20 69 |s. With |TSMTE, i|
|000009e0| 6e 6c 69 6e 65 20 69 6e | 70 75 74 20 69 73 20 6e |nline in|put is n|
|000009f0| 6f 74 20 71 75 69 74 65 | 20 73 6f 20 61 75 74 6f |ot quite| so auto|
|00000a00| 6d 61 74 69 63 20 d0 20 | 79 6f 75 20 68 61 76 65 |matic . |you have|
|00000a10| 20 74 6f 20 6d 61 6b 65 | 20 74 68 65 20 6e 65 63 | to make| the nec|
|00000a20| 65 73 73 61 72 79 20 63 | 61 6c 6c 73 20 74 6f 20 |essary c|alls to |
|00000a30| 54 53 4d 54 45 20 61 6e | 64 20 74 68 65 20 54 65 |TSMTE an|d the Te|
|00000a40| 78 74 20 53 65 72 76 69 | 63 65 73 20 4d 61 6e 61 |xt Servi|ces Mana|
|00000a50| 67 65 72 20 74 6f 20 6d | 61 6b 65 20 69 74 20 77 |ger to m|ake it w|
|00000a60| 6f 72 6b 2e 0d 4e 6f 74 | 65 3a 09 49 6e 73 69 64 |ork..Not|e:.Insid|
|00000a70| 65 20 4d 61 63 69 6e 74 | 6f 73 68 3a 20 54 65 78 |e Macint|osh: Tex|
|00000a80| 74 2c 20 70 61 67 65 73 | 20 32 2d 31 30 37 20 74 |t, pages| 2-107 t|
|00000a90| 6f 20 32 2d 31 30 39 2c | 20 64 69 73 63 75 73 73 |o 2-109,| discuss|
|00000aa0| 65 73 20 74 77 6f 20 66 | 65 61 74 75 72 65 20 62 |es two f|eature b|
|00000ab0| 69 74 73 2c 20 74 65 46 | 55 73 65 54 65 78 74 53 |its, teF|UseTextS|
|00000ac0| 65 72 76 69 63 65 73 20 | 61 6e 64 20 74 65 46 49 |ervices |and teFI|
|00000ad0| 6e 6c 69 6e 65 49 6e 70 | 75 74 2e 20 54 65 46 55 |nlineInp|ut. TeFU|
|00000ae0| 73 65 54 65 78 74 53 65 | 72 76 69 63 65 73 20 64 |seTextSe|rvices d|
|00000af0| 6f 65 73 6e d5 74 20 68 | 61 76 65 20 61 6e 79 20 |oesn.t h|ave any |
|00000b00| 69 6d 70 61 63 74 20 6f | 6e 20 74 68 65 20 54 65 |impact o|n the Te|
|00000b10| 78 74 20 53 65 72 76 69 | 63 65 73 20 4d 61 6e 61 |xt Servi|ces Mana|
|00000b20| 67 65 72 20 6f 72 20 54 | 53 4d 54 45 2c 20 73 6f |ger or T|SMTE, so|
|00000b30| 20 79 6f 75 20 63 61 6e | 20 73 61 66 65 6c 79 20 | you can| safely |
|00000b40| 69 67 6e 6f 72 65 20 69 | 74 2e 20 54 65 46 49 6e |ignore i|t. TeFIn|
|00000b50| 6c 69 6e 65 49 6e 70 75 | 74 20 69 73 20 68 61 6e |lineInpu|t is han|
|00000b60| 64 6c 65 64 20 62 79 20 | 54 53 4d 54 45 2c 20 73 |dled by |TSMTE, s|
|00000b70| 6f 20 74 68 65 72 65 20 | 69 73 20 6e 6f 20 6e 65 |o there |is no ne|
|00000b80| 65 64 20 66 6f 72 20 79 | 6f 75 20 74 6f 20 74 6f |ed for y|ou to to|
|00000b90| 75 63 68 20 69 74 2e 0d | 54 53 4d 54 45 20 4f 76 |uch it..|TSMTE Ov|
|00000ba0| 65 72 76 69 65 77 0d 41 | 76 61 69 6c 61 62 69 6c |erview.A|vailabil|
|00000bb0| 69 74 79 0d 43 75 72 72 | 65 6e 74 6c 79 2c 20 54 |ity.Curr|ently, T|
|00000bc0| 53 4d 54 45 20 69 73 20 | 64 65 6c 69 76 65 72 65 |SMTE is |delivere|
|00000bd0| 64 20 61 73 20 61 20 73 | 79 73 74 65 6d 20 65 78 |d as a s|ystem ex|
|00000be0| 74 65 6e 73 69 6f 6e 20 | 63 61 6c 6c 65 64 20 d2 |tension |called .|
|00000bf0| 49 6e 6c 69 6e 65 20 54 | 75 69 6b 61 20 4b 69 6e |Inline T|uika Kin|
|00000c00| 6f 75 d3 2c 20 77 68 69 | 63 68 20 69 73 20 73 68 |ou., whi|ch is sh|
|00000c10| 6f 77 6e 20 68 65 72 65 | 3a 0d 20 0d 46 69 67 75 |own here|:. .Figu|
|00000c20| 72 65 20 31 d0 49 6e 6c | 69 6e 65 20 54 75 69 6b |re 1.Inl|ine Tuik|
|00000c30| 61 20 4b 69 6e 6f 75 20 | 65 78 74 65 6e 73 69 6f |a Kinou |extensio|
|00000c40| 6e 20 66 69 6c 65 0d 49 | 66 20 79 6f 75 20 6c 6f |n file.I|f you lo|
|00000c50| 6f 6b 20 66 6f 72 20 74 | 68 69 73 20 66 69 6c 65 |ok for t|his file|
|00000c60| 20 77 68 69 6c 65 20 72 | 75 6e 6e 69 6e 67 20 73 | while r|unning s|
|00000c70| 79 73 74 65 6d 20 73 6f | 66 74 77 61 72 65 20 69 |ystem so|ftware i|
|00000c80| 6e 20 73 6f 6d 65 20 6c | 61 6e 67 75 61 67 65 20 |n some l|anguage |
|00000c90| 75 73 69 6e 67 20 74 68 | 65 20 52 6f 6d 61 6e 20 |using th|e Roman |
|00000ca0| 73 63 72 69 70 74 20 73 | 79 73 74 65 6d 2c 20 74 |script s|ystem, t|
|00000cb0| 68 65 20 6e 61 6d 65 20 | 6f 66 20 74 68 65 20 65 |he name |of the e|
|00000cc0| 78 74 65 6e 73 69 6f 6e | 20 66 69 6c 65 20 77 69 |xtension| file wi|
|00000cd0| 6c 6c 20 62 65 20 64 69 | 73 70 6c 61 79 65 64 20 |ll be di|splayed |
|00000ce0| 61 73 20 d2 83 43 83 93 | 83 89 83 43 83 93 92 c7 |as ..C..|...C....|
|00000cf0| 89 c1 8b 40 94 5c d3 2e | 0d 54 68 65 20 65 78 74 |...@.\..|.The ext|
|00000d00| 65 6e 73 69 6f 6e 20 69 | 73 20 70 61 72 74 20 6f |ension i|s part o|
|00000d10| 66 20 74 68 65 20 4a 61 | 70 61 6e 65 73 65 20 76 |f the Ja|panese v|
|00000d20| 65 72 73 69 6f 6e 20 6f | 66 20 53 79 73 74 65 6d |ersion o|f System|
|00000d30| 20 37 2e 31 2c 20 4b 61 | 6e 6a 69 54 61 6c 6b 20 | 7.1, Ka|njiTalk |
|00000d40| 37 2e 20 49 74 20 69 73 | 20 6e 6f 74 20 70 61 72 |7. It is| not par|
|00000d50| 74 20 6f 66 20 74 68 65 | 20 4a 61 70 61 6e 65 73 |t of the| Japanes|
|00000d60| 65 20 4c 61 6e 67 75 61 | 67 65 20 4b 69 74 20 6f |e Langua|ge Kit o|
|00000d70| 72 20 6f 66 20 61 6e 79 | 20 6f 74 68 65 72 20 76 |r of any| other v|
|00000d80| 65 72 73 69 6f 6e 20 6f | 66 20 53 79 73 74 65 6d |ersion o|f System|
|00000d90| 20 37 2e 31 2e 20 54 68 | 69 73 20 6d 65 61 6e 73 | 7.1. Th|is means|
|00000da0| 20 74 68 61 74 20 69 66 | 20 79 6f 75 20 75 73 65 | that if| you use|
|00000db0| 20 54 53 4d 54 45 20 74 | 6f 20 69 6d 70 6c 65 6d | TSMTE t|o implem|
|00000dc0| 65 6e 74 20 69 6e 6c 69 | 6e 65 20 69 6e 70 75 74 |ent inli|ne input|
|00000dd0| 2c 20 69 74 20 77 69 6c | 6c 20 63 75 72 72 65 6e |, it wil|l curren|
|00000de0| 74 6c 79 20 6f 6e 6c 79 | 20 62 65 6e 65 66 69 74 |tly only| benefit|
|00000df0| 20 75 73 65 72 73 20 6f | 66 20 4a 61 70 61 6e 65 | users o|f Japane|
|00000e00| 73 65 20 73 79 73 74 65 | 6d 20 73 6f 66 74 77 61 |se syste|m softwa|
|00000e10| 72 65 2e 20 48 6f 77 65 | 76 65 72 2c 20 54 53 4d |re. Howe|ver, TSM|
|00000e20| 54 45 20 6d 61 79 20 67 | 65 74 20 72 6f 6c 6c 65 |TE may g|et rolle|
|00000e30| 64 20 69 6e 74 6f 20 61 | 20 66 75 74 75 72 65 20 |d into a| future |
|00000e40| 76 65 72 73 69 6f 6e 20 | 6f 66 20 74 68 65 20 62 |version |of the b|
|00000e50| 61 73 65 20 73 79 73 74 | 65 6d 20 73 6f 66 74 77 |ase syst|em softw|
|00000e60| 61 72 65 2c 20 73 6f 20 | 74 68 61 74 20 69 74 20 |are, so |that it |
|00000e70| 77 6f 75 6c 64 20 74 68 | 65 6e 20 62 65 20 61 76 |would th|en be av|
|00000e80| 61 69 6c 61 62 6c 65 20 | 66 6f 72 20 75 73 65 20 |ailable |for use |
|00000e90| 77 69 74 68 20 61 6e 79 | 20 32 2d 62 79 74 65 20 |with any| 2-byte |
|00000ea0| 73 63 72 69 70 74 20 73 | 79 73 74 65 6d 20 6f 6e |script s|ystem on|
|00000eb0| 20 61 6e 79 20 4d 61 63 | 69 6e 74 6f 73 68 20 77 | any Mac|intosh w|
|00000ec0| 6f 72 6c 64 77 69 64 65 | 2e 20 59 6f 75 72 20 61 |orldwide|. Your a|
|00000ed0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 73 68 6f 75 6c |pplicati|on shoul|
|00000ee0| 64 20 74 68 65 72 65 66 | 6f 72 65 20 75 73 65 20 |d theref|ore use |
|00000ef0| 47 65 73 74 61 6c 74 20 | 74 6f 20 63 68 65 63 6b |Gestalt |to check|
|00000f00| 20 66 6f 72 20 74 68 65 | 20 70 72 65 73 65 6e 63 | for the| presenc|
|00000f10| 65 20 6f 66 20 54 53 4d | 54 45 20 61 6e 64 20 75 |e of TSM|TE and u|
|00000f20| 73 65 20 69 74 20 77 68 | 65 6e 65 76 65 72 20 69 |se it wh|enever i|
|00000f30| 74 20 69 73 20 61 76 61 | 69 6c 61 62 6c 65 2e 0d |t is ava|ilable..|
|00000f40| 46 6f 72 20 64 65 76 65 | 6c 6f 70 6d 65 6e 74 20 |For deve|lopment |
|00000f50| 70 75 72 70 6f 73 65 73 | 2c 20 69 66 20 79 6f 75 |purposes|, if you|
|00000f60| 20 64 6f 6e d5 74 20 66 | 65 65 6c 20 63 6f 6d 66 | don.t f|eel comf|
|00000f70| 6f 72 74 61 62 6c 65 20 | 75 73 69 6e 67 20 4a 61 |ortable |using Ja|
|00000f80| 70 61 6e 65 73 65 20 73 | 79 73 74 65 6d 20 73 6f |panese s|ystem so|
|00000f90| 66 74 77 61 72 65 2c 20 | 79 6f 75 20 63 61 6e 20 |ftware, |you can |
|00000fa0| 69 6e 73 74 61 6c 6c 20 | 74 68 65 20 4a 61 70 61 |install |the Japa|
|00000fb0| 6e 65 73 65 20 4c 61 6e | 67 75 61 67 65 20 4b 69 |nese Lan|guage Ki|
|00000fc0| 74 20 61 6e 64 20 74 68 | 65 20 49 6e 6c 69 6e 65 |t and th|e Inline|
|00000fd0| 20 54 75 69 6b 61 20 4b | 69 6e 6f 75 20 65 78 74 | Tuika K|inou ext|
|00000fe0| 65 6e 73 69 6f 6e 20 69 | 6e 74 6f 20 73 79 73 74 |ension i|nto syst|
|00000ff0| 65 6d 20 73 6f 66 74 77 | 61 72 65 20 69 6e 20 61 |em softw|are in a|
|00001000| 6e 79 20 6c 61 6e 67 75 | 61 67 65 20 74 68 61 74 |ny langu|age that|
|00001010| 20 79 6f 75 20 6c 69 6b | 65 2e 20 41 70 70 6c 65 | you lik|e. Apple|
|00001020| 20 64 6f 65 73 20 6e 6f | 74 20 65 78 61 63 74 6c | does no|t exactl|
|00001030| 79 20 67 75 61 72 61 6e | 74 65 65 20 74 68 61 74 |y guaran|tee that|
|00001040| 20 74 68 65 73 65 20 63 | 6f 6e 66 69 67 75 72 61 | these c|onfigura|
|00001050| 74 69 6f 6e 73 20 77 69 | 6c 6c 20 77 6f 72 6b 2c |tions wi|ll work,|
|00001060| 20 62 75 74 20 6f 75 72 | 20 65 78 70 65 72 69 65 | but our| experie|
|00001070| 6e 63 65 20 73 6f 20 66 | 61 72 20 68 61 73 20 62 |nce so f|ar has b|
|00001080| 65 65 6e 20 67 6f 6f 64 | 2e 20 46 69 6e 61 6c 20 |een good|. Final |
|00001090| 74 65 73 74 69 6e 67 20 | 73 68 6f 75 6c 64 20 6f |testing |should o|
|000010a0| 66 20 63 6f 75 72 73 65 | 20 62 65 20 64 6f 6e 65 |f course| be done|
|000010b0| 20 6f 6e 20 61 20 72 65 | 61 6c 20 4a 61 70 61 6e | on a re|al Japan|
|000010c0| 65 73 65 20 73 79 73 74 | 65 6d 2e 20 49 6e 20 6f |ese syst|em. In o|
|000010d0| 72 64 65 72 20 74 6f 20 | 67 65 74 20 79 6f 75 72 |rder to |get your|
|000010e0| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 74 6f 20 | applica|tion to |
|000010f0| 75 73 65 20 61 20 4a 61 | 70 61 6e 65 73 65 20 66 |use a Ja|panese f|
|00001100| 6f 6e 74 20 69 6e 20 64 | 69 61 6c 6f 67 73 20 6f |ont in d|ialogs o|
|00001110| 72 20 69 6e 20 64 6f 63 | 75 6d 65 6e 74 73 20 77 |r in doc|uments w|
|00001120| 68 65 72 65 20 79 6f 75 | 20 64 6f 6e d5 74 20 61 |here you| don.t a|
|00001130| 6c 6c 6f 77 20 74 68 65 | 20 75 73 65 72 20 74 6f |llow the| user to|
|00001140| 20 73 65 6c 65 63 74 20 | 61 20 66 6f 6e 74 2c 20 | select |a font, |
|00001150| 79 6f 75 20 68 61 76 65 | 20 74 6f 20 72 65 67 69 |you have| to regi|
|00001160| 73 74 65 72 20 79 6f 75 | 72 20 61 70 70 6c 69 63 |ster you|r applic|
|00001170| 61 74 69 6f 6e 20 61 73 | 20 4a 61 70 61 6e 65 73 |ation as| Japanes|
|00001180| 65 20 75 73 69 6e 67 20 | 74 68 65 20 4c 61 6e 67 |e using |the Lang|
|00001190| 75 61 67 65 20 52 65 67 | 69 73 74 65 72 20 61 70 |uage Reg|ister ap|
|000011a0| 70 6c 69 63 61 74 69 6f | 6e 20 74 68 61 74 20 63 |plicatio|n that c|
|000011b0| 6f 6d 65 73 20 77 69 74 | 68 20 74 68 65 20 4a 61 |omes wit|h the Ja|
|000011c0| 70 61 6e 65 73 65 20 4c | 61 6e 67 75 61 67 65 20 |panese L|anguage |
|000011d0| 4b 69 74 2e 0d 4c 69 6d | 69 74 61 74 69 6f 6e 73 |Kit..Lim|itations|
|000011e0| 0d 59 6f 75 20 6d 61 79 | 20 66 69 6e 64 20 74 68 |.You may| find th|
|000011f0| 61 74 20 77 69 74 68 20 | 73 6f 6d 65 20 66 6f 6e |at with |some fon|
|00001200| 74 73 20 54 53 4d 54 45 | 20 74 72 75 6e 63 61 74 |ts TSMTE| truncat|
|00001210| 65 73 20 74 68 65 20 6c | 6f 77 65 72 20 70 6f 72 |es the l|ower por|
|00001220| 74 69 6f 6e 20 6f 66 20 | 63 68 61 72 61 63 74 65 |tion of |characte|
|00001230| 72 73 20 64 72 61 77 6e | 20 69 6e 20 74 68 65 20 |rs drawn| in the |
|00001240| 69 6e 70 75 74 20 61 72 | 65 61 20 62 65 63 61 75 |input ar|ea becau|
|00001250| 73 65 20 69 74 20 72 65 | 73 65 72 76 65 73 20 61 |se it re|serves a|
|00001260| 20 74 77 6f 2d 70 69 78 | 65 6c 20 68 69 67 68 20 | two-pix|el high |
|00001270| 61 72 65 61 20 66 6f 72 | 20 75 6e 64 65 72 6c 69 |area for| underli|
|00001280| 6e 69 6e 67 2e 20 54 68 | 69 73 20 70 72 6f 62 6c |ning. Th|is probl|
|00001290| 65 6d 20 77 69 6c 6c 20 | 62 65 20 66 69 78 65 64 |em will |be fixed|
|000012a0| 20 69 6e 20 61 20 66 75 | 74 75 72 65 20 72 65 6c | in a fu|ture rel|
|000012b0| 65 61 73 65 2e 0d 50 72 | 65 72 65 71 75 69 73 69 |ease..Pr|erequisi|
|000012c0| 74 65 73 0d 54 6f 20 75 | 73 65 20 74 68 65 20 54 |tes.To u|se the T|
|000012d0| 65 78 74 20 53 65 72 76 | 69 63 65 73 20 4d 61 6e |ext Serv|ices Man|
|000012e0| 61 67 65 72 20 61 6e 64 | 20 54 53 4d 54 45 2c 20 |ager and| TSMTE, |
|000012f0| 79 6f 75 72 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |your app|lication|
|00001300| 20 68 61 73 20 74 6f 20 | 73 75 70 70 6f 72 74 20 | has to |support |
|00001310| 41 70 70 6c 65 20 65 76 | 65 6e 74 73 2e 20 54 68 |Apple ev|ents. Th|
|00001320| 69 73 20 6d 65 61 6e 73 | 20 74 68 61 74 20 69 74 |is means| that it|
|00001330| 20 68 61 73 20 74 6f 20 | 69 6e 73 74 61 6c 6c 20 | has to |install |
|00001340| 41 70 70 6c 65 20 65 76 | 65 6e 74 20 68 61 6e 64 |Apple ev|ent hand|
|00001350| 6c 65 72 73 20 61 74 20 | 6c 65 61 73 74 20 66 6f |lers at |least fo|
|00001360| 72 20 74 68 65 20 66 6f | 75 72 20 72 65 71 75 69 |r the fo|ur requi|
|00001370| 72 65 64 20 65 76 65 6e | 74 20 74 79 70 65 73 2c |red even|t types,|
|00001380| 20 61 6e 64 20 68 61 73 | 20 74 6f 20 73 65 74 20 | and has| to set |
|00001390| 74 68 65 20 69 73 48 69 | 67 68 4c 65 76 65 6c 45 |the isHi|ghLevelE|
|000013a0| 76 65 6e 74 41 77 61 72 | 65 20 62 69 74 20 69 6e |ventAwar|e bit in|
|000013b0| 20 74 68 65 20 53 49 5a | 45 20 2d 31 20 72 65 73 | the SIZ|E -1 res|
|000013c0| 6f 75 72 63 65 2e 0d 4e | 6f 74 65 3a 09 54 68 65 |ource..N|ote:.The|
|000013d0| 20 53 49 5a 45 20 72 65 | 73 6f 75 72 63 65 20 61 | SIZE re|source a|
|000013e0| 6c 73 6f 20 68 61 73 20 | 61 20 75 73 65 54 65 78 |lso has |a useTex|
|000013f0| 74 45 64 69 74 53 65 72 | 76 69 63 65 73 20 62 69 |tEditSer|vices bi|
|00001400| 74 2e 20 43 6f 6e 74 72 | 61 72 79 20 74 6f 20 74 |t. Contr|ary to t|
|00001410| 68 65 20 63 6f 6d 6d 65 | 6e 74 73 20 69 6e 20 54 |he comme|nts in T|
|00001420| 79 70 65 73 2e 72 20 61 | 6e 64 20 69 6e 20 49 6e |ypes.r a|nd in In|
|00001430| 73 69 64 65 20 4d 61 63 | 69 6e 74 6f 73 68 3a 20 |side Mac|intosh: |
|00001440| 54 65 78 74 2c 20 74 68 | 69 73 20 62 69 74 20 64 |Text, th|is bit d|
|00001450| 6f 65 73 6e d5 74 20 68 | 61 76 65 20 61 6e 79 20 |oesn.t h|ave any |
|00001460| 69 6e 66 6c 75 65 6e 63 | 65 20 6f 6e 20 69 6e 6c |influenc|e on inl|
|00001470| 69 6e 65 20 69 6e 70 75 | 74 20 64 6f 6e 65 20 77 |ine inpu|t done w|
|00001480| 69 74 68 20 74 68 65 20 | 54 65 78 74 20 53 65 72 |ith the |Text Ser|
|00001490| 76 69 63 65 73 20 4d 61 | 6e 61 67 65 72 20 61 6e |vices Ma|nager an|
|000014a0| 64 20 54 53 4d 54 45 2e | 20 49 74 20 77 61 73 20 |d TSMTE.| It was |
|000014b0| 75 73 65 64 20 62 79 20 | 74 68 65 20 65 78 74 65 |used by |the exte|
|000014c0| 6e 73 69 6f 6e 20 74 68 | 61 74 20 70 72 6f 76 69 |nsion th|at provi|
|000014d0| 64 65 64 20 69 6e 6c 69 | 6e 65 20 69 6e 70 75 74 |ded inli|ne input|
|000014e0| 20 66 6f 72 20 54 65 78 | 74 45 64 69 74 20 69 6e | for Tex|tEdit in|
|000014f0| 20 4b 61 6e 6a 69 54 61 | 6c 6b 20 36 2e 30 2e 37 | KanjiTa|lk 6.0.7|
|00001500| 2e 0d 50 72 65 70 61 72 | 69 6e 67 20 74 6f 20 55 |..Prepar|ing to U|
|00001510| 73 65 20 54 53 4d 54 45 | 0d 53 74 61 72 74 69 6e |se TSMTE|.Startin|
|00001520| 67 20 66 72 6f 6d 20 74 | 68 69 73 20 73 65 63 74 |g from t|his sect|
|00001530| 69 6f 6e 2c 20 77 65 20 | 61 73 73 75 6d 65 20 74 |ion, we |assume t|
|00001540| 68 61 74 20 79 6f 75 20 | 68 61 76 65 20 61 20 67 |hat you |have a g|
|00001550| 6f 6f 64 20 75 6e 64 65 | 72 73 74 61 6e 64 69 6e |ood unde|rstandin|
|00001560| 67 20 6f 66 20 74 68 65 | 20 68 69 67 68 2d 6c 65 |g of the| high-le|
|00001570| 76 65 6c 20 72 6f 75 74 | 69 6e 65 73 20 6f 66 20 |vel rout|ines of |
|00001580| 74 68 65 20 54 65 78 74 | 20 53 65 72 76 69 63 65 |the Text| Service|
|00001590| 73 20 4d 61 6e 61 67 65 | 72 2e 20 59 6f 75 20 63 |s Manage|r. You c|
|000015a0| 61 6e 20 66 69 6e 64 20 | 74 68 65 20 6e 65 63 65 |an find |the nece|
|000015b0| 73 73 61 72 79 20 69 6e | 66 6f 72 6d 61 74 69 6f |ssary in|formatio|
|000015c0| 6e 20 69 6e 20 49 6e 73 | 69 64 65 20 4d 61 63 69 |n in Ins|ide Maci|
|000015d0| 6e 74 6f 73 68 3a 20 54 | 65 78 74 2c 20 70 61 67 |ntosh: T|ext, pag|
|000015e0| 65 73 20 37 2d 31 37 20 | 74 6f 20 37 2d 32 34 2e |es 7-17 |to 7-24.|
|000015f0| 20 50 6c 65 61 73 65 20 | 6d 61 6b 65 20 73 75 72 | Please |make sur|
|00001600| 65 20 74 6f 20 72 65 61 | 64 20 74 68 65 20 73 65 |e to rea|d the se|
|00001610| 63 74 69 6f 6e 20 d2 4d | 6f 72 65 20 49 6e 6c 69 |ction .M|ore Inli|
|00001620| 6e 65 20 49 6e 70 75 74 | 20 41 64 76 69 63 65 d3 |ne Input| Advice.|
|00001630| 20 61 74 20 74 68 65 20 | 65 6e 64 20 6f 66 20 74 | at the |end of t|
|00001640| 68 69 73 20 54 65 63 68 | 6e 69 63 61 6c 20 4e 6f |his Tech|nical No|
|00001650| 74 65 20 66 6f 72 20 61 | 64 64 69 74 69 6f 6e 61 |te for a|dditiona|
|00001660| 6c 20 68 69 6e 74 73 20 | 6f 6e 20 68 6f 77 20 74 |l hints |on how t|
|00001670| 6f 20 73 75 63 63 65 73 | 73 66 75 6c 6c 79 20 75 |o succes|sfully u|
|00001680| 73 65 20 74 68 65 20 54 | 65 78 74 20 53 65 72 76 |se the T|ext Serv|
|00001690| 69 63 65 73 20 4d 61 6e | 61 67 65 72 20 61 6e 64 |ices Man|ager and|
|000016a0| 20 69 6e 70 75 74 20 6d | 65 74 68 6f 64 73 2e 0d | input m|ethods..|
|000016b0| 44 65 66 69 6e 69 6e 67 | 20 74 68 65 20 4c 65 76 |Defining| the Lev|
|000016c0| 65 6c 20 6f 66 20 46 75 | 6e 63 74 69 6f 6e 61 6c |el of Fu|nctional|
|000016d0| 69 74 79 20 59 6f 75 20 | 4e 65 65 64 0d 59 6f 75 |ity You |Need.You|
|000016e0| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 63 61 |r applic|ation ca|
|000016f0| 6e 20 70 72 6f 76 69 64 | 65 20 73 65 76 65 72 61 |n provid|e severa|
|00001700| 6c 20 64 69 66 66 65 72 | 65 6e 74 20 6b 69 6e 64 |l differ|ent kind|
|00001710| 73 20 6f 66 20 74 65 78 | 74 20 65 64 69 74 69 6e |s of tex|t editin|
|00001720| 67 20 66 75 6e 63 74 69 | 6f 6e 61 6c 69 74 79 2c |g functi|onality,|
|00001730| 20 61 6e 64 20 79 6f 75 | 72 20 75 73 61 67 65 20 | and you|r usage |
|00001740| 6f 66 20 54 53 4d 54 45 | 20 61 6e 64 20 74 68 65 |of TSMTE| and the|
|00001750| 20 54 65 78 74 20 53 65 | 72 76 69 63 65 73 20 4d | Text Se|rvices M|
|00001760| 61 6e 61 67 65 72 20 64 | 65 70 65 6e 64 73 20 6f |anager d|epends o|
|00001770| 6e 20 77 68 69 63 68 20 | 6f 6e 65 20 79 6f 75 20 |n which |one you |
|00001780| 6f 66 66 65 72 2e 20 59 | 6f 75 72 20 61 70 70 6c |offer. Y|our appl|
|00001790| 69 63 61 74 69 6f 6e 20 | 6d 61 79 20 73 75 70 70 |ication |may supp|
|000017a0| 6f 72 74 20 74 65 78 74 | 20 69 6e 70 75 74 3a 0d |ort text| input:.|
|000017b0| 31 29 09 69 6e 20 6d 6f | 64 61 6c 20 64 69 61 6c |1).in mo|dal dial|
|000017c0| 6f 67 73 20 28 77 68 69 | 63 68 20 75 73 65 20 54 |ogs (whi|ch use T|
|000017d0| 65 78 74 45 64 69 74 29 | 0d 32 29 09 69 6e 20 64 |extEdit)|.2).in d|
|000017e0| 6f 63 75 6d 65 6e 74 20 | 77 69 6e 64 6f 77 73 20 |ocument |windows |
|000017f0| 75 73 69 6e 67 20 54 65 | 78 74 45 64 69 74 20 61 |using Te|xtEdit a|
|00001800| 6e 64 20 69 6e 20 6d 6f | 64 65 6c 65 73 73 20 64 |nd in mo|deless d|
|00001810| 69 61 6c 6f 67 73 0d 33 | 29 09 69 6e 20 77 69 6e |ialogs.3|).in win|
|00001820| 64 6f 77 73 20 75 73 69 | 6e 67 20 79 6f 75 72 20 |dows usi|ng your |
|00001830| 6f 77 6e 20 74 65 78 74 | 20 65 6e 67 69 6e 65 0d |own text| engine.|
|00001840| 70 6c 75 73 20 69 6e 20 | 61 6e 79 20 63 6f 6d 62 |plus in |any comb|
|00001850| 69 6e 61 74 69 6f 6e 20 | 74 68 65 72 65 6f 66 2e |ination |thereof.|
|00001860| 0d 54 68 65 20 72 65 73 | 74 20 6f 66 20 74 68 69 |.The res|t of thi|
|00001870| 73 20 73 65 63 74 69 6f | 6e 20 64 69 73 63 75 73 |s sectio|n discus|
|00001880| 73 65 73 20 74 68 65 20 | 73 74 65 70 73 20 79 6f |ses the |steps yo|
|00001890| 75 20 68 61 76 65 20 74 | 6f 20 74 61 6b 65 20 74 |u have t|o take t|
|000018a0| 6f 20 70 72 65 70 61 72 | 65 20 79 6f 75 72 20 61 |o prepar|e your a|
|000018b0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 74 6f 20 75 73 |pplicati|on to us|
|000018c0| 65 20 54 53 4d 54 45 20 | 69 6e 20 61 6e 79 20 70 |e TSMTE |in any p|
|000018d0| 6f 73 73 69 62 6c 65 20 | 63 6f 6e 74 65 78 74 2e |ossible |context.|
|000018e0| 20 54 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 73 | The fol|lowing s|
|000018f0| 65 63 74 69 6f 6e 73 20 | 74 68 65 6e 20 6c 6f 6f |ections |then loo|
|00001900| 6b 20 61 74 20 74 68 65 | 20 69 6e 64 69 76 69 64 |k at the| individ|
|00001910| 75 61 6c 20 63 61 73 65 | 73 2e 0d 54 65 73 74 69 |ual case|s..Testi|
|00001920| 6e 67 20 66 6f 72 20 54 | 53 4d 54 45 0d 42 65 66 |ng for T|SMTE.Bef|
|00001930| 6f 72 65 20 6d 61 6b 69 | 6e 67 20 63 61 6c 6c 73 |ore maki|ng calls|
|00001940| 20 66 6f 72 20 54 53 4d | 54 45 2c 20 79 6f 75 20 | for TSM|TE, you |
|00001950| 68 61 76 65 20 74 6f 20 | 63 68 65 63 6b 20 66 6f |have to |check fo|
|00001960| 72 20 69 74 73 20 70 72 | 65 73 65 6e 63 65 20 75 |r its pr|esence u|
|00001970| 73 69 6e 67 20 47 65 73 | 74 61 6c 74 2e 20 54 68 |sing Ges|talt. Th|
|00001980| 65 20 73 65 6c 65 63 74 | 6f 72 20 66 6f 72 20 54 |e select|or for T|
|00001990| 53 4d 54 45 20 69 73 20 | 67 65 73 74 61 6c 74 54 |SMTE is |gestaltT|
|000019a0| 53 4d 54 45 41 74 74 72 | 2c 20 61 6e 64 20 79 6f |SMTEAttr|, and yo|
|000019b0| 75 20 6b 6e 6f 77 20 74 | 68 61 74 20 69 74 20 69 |u know t|hat it i|
|000019c0| 73 20 61 76 61 69 6c 61 | 62 6c 65 20 69 66 20 74 |s availa|ble if t|
|000019d0| 68 65 20 67 65 73 74 61 | 6c 74 54 53 4d 54 45 50 |he gesta|ltTSMTEP|
|000019e0| 72 65 73 65 6e 74 20 62 | 69 74 20 69 6e 20 74 68 |resent b|it in th|
|000019f0| 65 20 72 65 73 70 6f 6e | 73 65 20 69 73 20 73 65 |e respon|se is se|
|00001a00| 74 2e 0d 54 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |t..The f|ollowing|
|00001a10| 20 63 6f 64 65 20 69 6e | 69 74 69 61 6c 69 7a 65 | code in|itialize|
|00001a20| 73 20 73 65 70 61 72 61 | 74 65 20 42 6f 6f 6c 65 |s separa|te Boole|
|00001a30| 61 6e 20 76 61 72 69 61 | 62 6c 65 73 20 74 6f 20 |an varia|bles to |
|00001a40| 69 6e 64 69 63 61 74 65 | 20 74 68 65 20 70 72 65 |indicate| the pre|
|00001a50| 73 65 6e 63 65 20 6f 66 | 20 74 68 65 20 54 65 78 |sence of| the Tex|
|00001a60| 74 20 53 65 72 76 69 63 | 65 73 20 4d 61 6e 61 67 |t Servic|es Manag|
|00001a70| 65 72 20 61 6e 64 20 54 | 53 4d 54 45 2e 20 48 61 |er and T|SMTE. Ha|
|00001a80| 76 69 6e 67 20 73 65 70 | 61 72 61 74 65 20 76 61 |ving sep|arate va|
|00001a90| 72 69 61 62 6c 65 73 20 | 69 73 20 75 73 65 66 75 |riables |is usefu|
|00001aa0| 6c 20 69 66 20 79 6f 75 | 20 75 73 65 20 79 6f 75 |l if you| use you|
|00001ab0| 72 20 6f 77 6e 20 74 65 | 78 74 20 65 6e 67 69 6e |r own te|xt engin|
|00001ac0| 65 20 69 6e 20 61 64 64 | 69 74 69 6f 6e 20 74 6f |e in add|ition to|
|00001ad0| 20 54 65 78 74 45 64 69 | 74 20 61 6e 64 20 77 61 | TextEdi|t and wa|
|00001ae0| 6e 74 20 74 6f 20 73 75 | 70 70 6f 72 74 20 69 6e |nt to su|pport in|
|00001af0| 6c 69 6e 65 20 69 6e 70 | 75 74 20 66 6f 72 20 74 |line inp|ut for t|
|00001b00| 68 61 74 20 65 6e 67 69 | 6e 65 20 65 76 65 6e 20 |hat engi|ne even |
|00001b10| 69 66 20 54 53 4d 54 45 | 20 69 73 20 6e 6f 74 20 |if TSMTE| is not |
|00001b20| 70 72 65 73 65 6e 74 2e | 0d 73 74 61 74 69 63 20 |present.|.static |
|00001b30| 76 6f 69 64 20 43 68 65 | 63 6b 46 6f 72 54 65 78 |void Che|ckForTex|
|00001b40| 74 53 65 72 76 69 63 65 | 73 28 76 6f 69 64 29 0d |tService|s(void).|
|00001b50| 7b 0d 09 6c 6f 6e 67 20 | 67 65 73 74 61 6c 74 52 |{..long |gestaltR|
|00001b60| 65 73 70 6f 6e 73 65 3b | 0d 09 0d 09 67 48 61 73 |esponse;|....gHas|
|00001b70| 54 65 78 74 53 65 72 76 | 69 63 65 73 20 3d 20 66 |TextServ|ices = f|
|00001b80| 61 6c 73 65 3b 09 09 2f | 2f 20 75 6e 6c 65 73 73 |alse;../|/ unless|
|00001b90| 20 70 72 6f 76 65 6e 20 | 6f 74 68 65 72 77 69 73 | proven |otherwis|
|00001ba0| 65 0d 09 67 48 61 73 54 | 53 4d 54 45 20 3d 20 66 |e..gHasT|SMTE = f|
|00001bb0| 61 6c 73 65 3b 09 09 09 | 2f 2f 20 75 6e 6c 65 73 |alse;...|// unles|
|00001bc0| 73 20 70 72 6f 76 65 6e | 20 6f 74 68 65 72 77 69 |s proven| otherwi|
|00001bd0| 73 65 0d 09 0d 09 69 66 | 20 28 54 72 61 70 41 76 |se....if| (TrapAv|
|00001be0| 61 69 6c 61 62 6c 65 28 | 5f 47 65 73 74 61 6c 74 |ailable(|_Gestalt|
|00001bf0| 29 29 0d 09 7b 0d 09 09 | 69 66 20 28 28 47 65 73 |))..{...|if ((Ges|
|00001c00| 74 61 6c 74 28 67 65 73 | 74 61 6c 74 54 53 4d 67 |talt(ges|taltTSMg|
|00001c10| 72 56 65 72 73 69 6f 6e | 2c 20 26 67 65 73 74 61 |rVersion|, &gesta|
|00001c20| 6c 74 52 65 73 70 6f 6e | 73 65 29 20 3d 3d 20 6e |ltRespon|se) == n|
|00001c30| 6f 45 72 72 29 20 26 26 | 0d 09 09 09 20 28 67 65 |oErr) &&|.... (ge|
|00001c40| 73 74 61 6c 74 52 65 73 | 70 6f 6e 73 65 20 3e 3d |staltRes|ponse >=|
|00001c50| 20 31 29 29 0d 09 09 7b | 0d 09 09 09 67 48 61 73 | 1))...{|....gHas|
|00001c60| 54 65 78 74 53 65 72 76 | 69 63 65 73 20 3d 20 74 |TextServ|ices = t|
|00001c70| 72 75 65 3b 0d 09 09 09 | 69 66 20 28 47 65 73 74 |rue;....|if (Gest|
|00001c80| 61 6c 74 28 67 65 73 74 | 61 6c 74 54 53 4d 54 45 |alt(gest|altTSMTE|
|00001c90| 41 74 74 72 2c 20 26 67 | 65 73 74 61 6c 74 52 65 |Attr, &g|estaltRe|
|00001ca0| 73 70 6f 6e 73 65 29 20 | 3d 3d 20 6e 6f 45 72 72 |sponse) |== noErr|
|00001cb0| 29 0d 09 09 09 09 67 48 | 61 73 54 53 4d 54 45 20 |).....gH|asTSMTE |
|00001cc0| 3d 20 42 54 73 74 28 67 | 65 73 74 61 6c 74 52 65 |= BTst(g|estaltRe|
|00001cd0| 73 70 6f 6e 73 65 2c 20 | 67 65 73 74 61 6c 74 54 |sponse, |gestaltT|
|00001ce0| 53 4d 54 45 50 72 65 73 | 65 6e 74 29 3b 0d 09 09 |SMTEPres|ent);...|
|00001cf0| 7d 3b 0d 09 7d 3b 0d 7d | 0d 49 6e 69 74 69 61 6c |};..};.}|.Initial|
|00001d00| 69 7a 69 6e 67 20 61 6e | 64 20 43 6c 6f 73 69 6e |izing an|d Closin|
|00001d10| 67 20 74 68 65 20 54 65 | 78 74 20 53 65 72 76 69 |g the Te|xt Servi|
|00001d20| 63 65 73 20 4d 61 6e 61 | 67 65 72 0d 54 6f 20 65 |ces Mana|ger.To e|
|00001d30| 6e 61 62 6c 65 20 69 6e | 6c 69 6e 65 20 69 6e 70 |nable in|line inp|
|00001d40| 75 74 2c 20 79 6f 75 20 | 68 61 76 65 20 74 6f 20 |ut, you |have to |
|00001d50| 69 6e 69 74 69 61 6c 69 | 7a 65 20 74 68 65 20 54 |initiali|ze the T|
|00001d60| 65 78 74 20 53 65 72 76 | 69 63 65 73 20 4d 61 6e |ext Serv|ices Man|
|00001d70| 61 67 65 72 20 62 79 20 | 63 61 6c 6c 69 6e 67 20 |ager by |calling |
|00001d80| 49 6e 69 74 54 53 4d 41 | 77 61 72 65 41 70 70 6c |InitTSMA|wareAppl|
|00001d90| 69 63 61 74 69 6f 6e 20 | 69 6e 20 79 6f 75 72 20 |ication |in your |
|00001da0| 69 6e 69 74 69 61 6c 69 | 7a 61 74 69 6f 6e 20 73 |initiali|zation s|
|00001db0| 65 71 75 65 6e 63 65 2c | 20 61 6e 64 20 63 6c 6f |equence,| and clo|
|00001dc0| 73 65 20 69 74 20 62 65 | 66 6f 72 65 20 71 75 69 |se it be|fore qui|
|00001dd0| 74 74 69 6e 67 20 62 79 | 20 63 61 6c 6c 69 6e 67 |tting by| calling|
|00001de0| 20 43 6c 6f 73 65 54 53 | 4d 41 77 61 72 65 41 70 | CloseTS|MAwareAp|
|00001df0| 70 6c 69 63 61 74 69 6f | 6e 2e 20 42 75 74 20 77 |plicatio|n. But w|
|00001e00| 68 61 74 20 69 66 20 54 | 53 4d 54 45 20 69 73 20 |hat if T|SMTE is |
|00001e10| 6e 6f 74 20 61 76 61 69 | 6c 61 62 6c 65 3f 20 54 |not avai|lable? T|
|00001e20| 68 65 6e 20 79 6f 75 20 | 68 61 76 65 20 74 6f 20 |hen you |have to |
|00001e30| 6d 61 6b 65 20 74 68 65 | 20 66 6c 6f 61 74 69 6e |make the| floatin|
|00001e40| 67 20 69 6e 70 75 74 20 | 77 69 6e 64 6f 77 20 61 |g input |window a|
|00001e50| 76 61 69 6c 61 62 6c 65 | 20 74 6f 20 74 68 65 20 |vailable| to the |
|00001e60| 75 73 65 72 20 66 6f 72 | 20 65 6e 74 65 72 69 6e |user for| enterin|
|00001e70| 67 20 74 65 78 74 20 69 | 6e 20 61 20 32 2d 62 79 |g text i|n a 2-by|
|00001e80| 74 65 20 73 63 72 69 70 | 74 20 69 6e 74 6f 20 61 |te scrip|t into a|
|00001e90| 20 54 65 78 74 45 64 69 | 74 20 66 69 65 6c 64 2e | TextEdi|t field.|
|00001ea0| 20 48 6f 77 20 74 6f 20 | 64 6f 20 74 68 69 73 20 | How to |do this |
|00001eb0| 64 65 70 65 6e 64 73 20 | 6f 6e 20 77 68 65 74 68 |depends |on wheth|
|00001ec0| 65 72 20 79 6f 75 20 75 | 73 65 20 79 6f 75 72 20 |er you u|se your |
|00001ed0| 6f 77 6e 20 74 65 78 74 | 20 65 6e 67 69 6e 65 20 |own text| engine |
|00001ee0| 69 6e 20 61 64 64 69 74 | 69 6f 6e 20 74 6f 20 54 |in addit|ion to T|
|00001ef0| 65 78 74 45 64 69 74 20 | 28 77 65 20 61 73 73 75 |extEdit |(we assu|
|00001f00| 6d 65 20 74 68 61 74 20 | 79 6f 75 72 20 6f 77 6e |me that |your own|
|00001f10| 20 74 65 78 74 20 65 6e | 67 69 6e 65 20 73 75 70 | text en|gine sup|
|00001f20| 70 6f 72 74 73 20 69 6e | 6c 69 6e 65 20 69 6e 70 |ports in|line inp|
|00001f30| 75 74 20 d0 20 6f 74 68 | 65 72 77 69 73 65 20 79 |ut . oth|erwise y|
|00001f40| 6f 75 20 70 72 6f 62 61 | 62 6c 79 20 77 6f 75 6c |ou proba|bly woul|
|00001f50| 64 20 6e 6f 74 20 74 68 | 69 6e 6b 20 61 62 6f 75 |d not th|ink abou|
|00001f60| 74 20 61 64 64 69 6e 67 | 20 69 6e 6c 69 6e 65 20 |t adding| inline |
|00001f70| 69 6e 70 75 74 20 73 75 | 70 70 6f 72 74 20 74 6f |input su|pport to|
|00001f80| 20 54 65 78 74 45 64 69 | 74 29 2e 0d 49 66 20 79 | TextEdi|t)..If y|
|00001f90| 6f 75 20 6f 6e 6c 79 20 | 75 73 65 20 54 65 78 74 |ou only |use Text|
|00001fa0| 45 64 69 74 20 69 6e 20 | 79 6f 75 72 20 61 70 70 |Edit in |your app|
|00001fb0| 6c 69 63 61 74 69 6f 6e | 2c 20 79 6f 75 20 73 69 |lication|, you si|
|00001fc0| 6d 70 6c 79 20 63 61 6c | 6c 20 49 6e 69 74 54 53 |mply cal|l InitTS|
|00001fd0| 4d 41 77 61 72 65 41 70 | 70 6c 69 63 61 74 69 6f |MAwareAp|plicatio|
|00001fe0| 6e 20 6f 6e 6c 79 20 69 | 66 20 54 53 4d 54 45 20 |n only i|f TSMTE |
|00001ff0| 69 73 20 61 76 61 69 6c | 61 62 6c 65 2e 20 49 66 |is avail|able. If|
|00002000| 20 79 6f 75 20 64 6f 6e | d5 74 20 63 61 6c 6c 20 | you don|.t call |
|00002010| 49 6e 69 74 54 53 4d 41 | 77 61 72 65 41 70 70 6c |InitTSMA|wareAppl|
|00002020| 69 63 61 74 69 6f 6e 2c | 20 73 79 73 74 65 6d 20 |ication,| system |
|00002030| 73 6f 66 74 77 61 72 65 | 20 77 69 6c 6c 20 61 75 |software| will au|
|00002040| 74 6f 6d 61 74 69 63 61 | 6c 6c 79 20 68 61 6e 64 |tomatica|lly hand|
|00002050| 6c 65 20 69 6e 70 75 74 | 20 69 6e 20 32 2d 62 79 |le input| in 2-by|
|00002060| 74 65 20 73 63 72 69 70 | 74 73 20 66 6f 72 20 79 |te scrip|ts for y|
|00002070| 6f 75 72 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |our appl|ication |
|00002080| 69 6e 20 61 20 66 6c 6f | 61 74 69 6e 67 20 69 6e |in a flo|ating in|
|00002090| 70 75 74 20 77 69 6e 64 | 6f 77 2e 20 54 68 65 20 |put wind|ow. The |
|000020a0| 66 6f 6c 6c 6f 77 69 6e | 67 20 63 6f 64 65 20 70 |followin|g code p|
|000020b0| 65 72 66 6f 72 6d 73 20 | 74 68 65 20 69 6e 69 74 |erforms |the init|
|000020c0| 69 61 6c 69 7a 61 74 69 | 6f 6e 20 61 6e 64 20 61 |ializati|on and a|
|000020d0| 6c 73 6f 20 73 68 6f 77 | 73 20 68 6f 77 20 74 6f |lso show|s how to|
|000020e0| 20 6d 6f 76 65 20 6f 6e | 20 77 69 74 68 6f 75 74 | move on| without|
|000020f0| 20 74 65 78 74 20 73 65 | 72 76 69 63 65 73 20 69 | text se|rvices i|
|00002100| 66 20 49 6e 69 74 54 53 | 4d 41 77 61 72 65 41 70 |f InitTS|MAwareAp|
|00002110| 70 6c 69 63 61 74 69 6f | 6e 20 66 61 69 6c 73 3a |plicatio|n fails:|
|00002120| 0d 69 66 20 28 21 28 67 | 48 61 73 54 53 4d 54 45 |.if (!(g|HasTSMTE|
|00002130| 20 26 26 20 49 6e 69 74 | 54 53 4d 41 77 61 72 65 | && Init|TSMAware|
|00002140| 41 70 70 6c 69 63 61 74 | 69 6f 6e 28 29 20 3d 3d |Applicat|ion() ==|
|00002150| 20 6e 6f 45 72 72 29 29 | 0d 7b 0d 09 2f 2f 20 69 | noErr))|.{..// i|
|00002160| 66 20 74 68 69 73 20 68 | 61 70 70 65 6e 73 2c 20 |f this h|appens, |
|00002170| 6a 75 73 74 20 6d 6f 76 | 65 20 6f 6e 20 77 69 74 |just mov|e on wit|
|00002180| 68 6f 75 74 20 74 65 78 | 74 20 73 65 72 76 69 63 |hout tex|t servic|
|00002190| 65 73 0d 09 67 48 61 73 | 54 65 78 74 53 65 72 76 |es..gHas|TextServ|
|000021a0| 69 63 65 73 20 3d 20 66 | 61 6c 73 65 3b 0d 09 67 |ices = f|alse;..g|
|000021b0| 48 61 73 54 53 4d 54 45 | 20 3d 20 66 61 6c 73 65 |HasTSMTE| = false|
|000021c0| 3b 0d 7d 3b 0d 49 66 20 | 79 6f 75 20 75 73 65 20 |;.};.If |you use |
|000021d0| 79 6f 75 72 20 6f 77 6e | 20 74 65 78 74 20 65 6e |your own| text en|
|000021e0| 67 69 6e 65 20 69 6e 20 | 61 64 64 69 74 69 6f 6e |gine in |addition|
|000021f0| 20 74 6f 20 54 65 78 74 | 45 64 69 74 20 61 6e 64 | to Text|Edit and|
|00002200| 20 73 75 70 70 6f 72 74 | 20 69 6e 6c 69 6e 65 20 | support| inline |
|00002210| 69 6e 70 75 74 20 66 6f | 72 20 69 74 2c 20 79 6f |input fo|r it, yo|
|00002220| 75 20 77 61 6e 74 20 74 | 6f 20 75 73 65 20 69 6e |u want t|o use in|
|00002230| 6c 69 6e 65 20 69 6e 70 | 75 74 20 66 6f 72 20 79 |line inp|ut for y|
|00002240| 6f 75 72 20 65 6e 67 69 | 6e 65 20 65 76 65 6e 20 |our engi|ne even |
|00002250| 69 66 20 54 53 4d 54 45 | 20 69 73 20 6e 6f 74 20 |if TSMTE| is not |
|00002260| 61 76 61 69 6c 61 62 6c | 65 2e 20 54 6f 20 64 6f |availabl|e. To do|
|00002270| 20 74 68 69 73 2c 20 79 | 6f 75 20 73 69 6d 70 6c | this, y|ou simpl|
|00002280| 79 20 63 68 65 63 6b 20 | 67 48 61 73 54 65 78 74 |y check |gHasText|
|00002290| 53 65 72 76 69 63 65 73 | 20 69 6e 73 74 65 61 64 |Services| instead|
|000022a0| 20 6f 66 20 67 48 61 73 | 54 53 4d 54 45 20 69 6e | of gHas|TSMTE in|
|000022b0| 20 74 68 65 20 66 69 72 | 73 74 20 6c 69 6e 65 20 | the fir|st line |
|000022c0| 6f 66 20 74 68 65 20 63 | 6f 64 65 20 61 62 6f 76 |of the c|ode abov|
|000022d0| 65 2e 20 4c 61 74 65 72 | 2c 20 79 6f 75 20 61 6c |e. Later|, you al|
|000022e0| 73 6f 20 68 61 76 65 20 | 74 6f 20 6d 61 6b 65 20 |so have |to make |
|000022f0| 73 75 72 65 20 74 68 61 | 74 20 79 6f 75 20 74 65 |sure tha|t you te|
|00002300| 6c 6c 20 74 68 65 20 54 | 65 78 74 20 53 65 72 76 |ll the T|ext Serv|
|00002310| 69 63 65 73 20 4d 61 6e | 61 67 65 72 20 74 6f 20 |ices Man|ager to |
|00002320| 75 73 65 20 74 68 65 20 | 66 6c 6f 61 74 69 6e 67 |use the |floating|
|00002330| 20 69 6e 70 75 74 20 77 | 69 6e 64 6f 77 20 77 68 | input w|indow wh|
|00002340| 65 6e 65 76 65 72 20 61 | 20 54 65 78 74 45 64 69 |enever a| TextEdi|
|00002350| 74 20 66 69 65 6c 64 20 | 69 73 20 61 63 74 69 76 |t field |is activ|
|00002360| 65 20 d0 20 74 68 65 20 | 73 65 63 74 69 6f 6e 20 |e . the |section |
|00002370| d2 55 73 69 6e 67 20 54 | 53 4d 54 45 20 61 6e 64 |.Using T|SMTE and|
|00002380| 20 54 65 78 74 45 64 69 | 74 20 69 6e 20 41 64 64 | TextEdi|t in Add|
|00002390| 69 74 69 6f 6e 20 74 6f | 20 59 6f 75 72 20 4f 77 |ition to| Your Ow|
|000023a0| 6e 20 54 65 78 74 20 45 | 6e 67 69 6e 65 d3 20 64 |n Text E|ngine. d|
|000023b0| 69 73 63 75 73 73 65 73 | 20 74 68 69 73 20 69 6e |iscusses| this in|
|000023c0| 20 64 65 74 61 69 6c 2e | 0d 49 6e 20 65 69 74 68 | detail.|.In eith|
|000023d0| 65 72 20 63 61 73 65 2c | 20 79 6f 75 20 68 61 76 |er case,| you hav|
|000023e0| 65 20 74 6f 20 63 61 6c | 6c 20 43 6c 6f 73 65 54 |e to cal|l CloseT|
|000023f0| 53 4d 41 77 61 72 65 41 | 70 70 6c 69 63 61 74 69 |SMAwareA|pplicati|
|00002400| 6f 6e 20 62 65 66 6f 72 | 65 20 71 75 69 74 74 69 |on befor|e quitti|
|00002410| 6e 67 20 61 6e 20 61 70 | 70 6c 69 63 61 74 69 6f |ng an ap|plicatio|
|00002420| 6e 20 66 6f 72 20 77 68 | 69 63 68 20 79 6f 75 20 |n for wh|ich you |
|00002430| 73 75 63 63 65 73 73 66 | 75 6c 6c 79 20 63 61 6c |successf|ully cal|
|00002440| 6c 65 64 20 49 6e 69 74 | 54 53 4d 41 77 61 72 65 |led Init|TSMAware|
|00002450| 41 70 70 6c 69 63 61 74 | 69 6f 6e 3a 0d 69 66 20 |Applicat|ion:.if |
|00002460| 28 67 48 61 73 54 65 78 | 74 53 65 72 76 69 63 65 |(gHasTex|tService|
|00002470| 73 29 0d 09 28 76 6f 69 | 64 29 20 43 6c 6f 73 65 |s)..(voi|d) Close|
|00002480| 54 53 4d 41 77 61 72 65 | 41 70 70 6c 69 63 61 74 |TSMAware|Applicat|
|00002490| 69 6f 6e 28 29 3b 0d 45 | 78 69 74 54 6f 53 68 65 |ion();.E|xitToShe|
|000024a0| 6c 6c 28 29 3b 0d 55 73 | 69 6e 67 20 54 53 4d 54 |ll();.Us|ing TSMT|
|000024b0| 45 20 66 6f 72 20 4d 6f | 64 61 6c 20 44 69 61 6c |E for Mo|dal Dial|
|000024c0| 6f 67 73 0d 4f 6e 63 65 | 20 79 6f 75 20 68 61 76 |ogs.Once| you hav|
|000024d0| 65 20 69 6e 69 74 69 61 | 6c 69 7a 65 64 20 74 68 |e initia|lized th|
|000024e0| 65 20 54 65 78 74 20 53 | 65 72 76 69 63 65 73 20 |e Text S|ervices |
|000024f0| 4d 61 6e 61 67 65 72 2c | 20 54 53 4d 54 45 20 6f |Manager,| TSMTE o|
|00002500| 66 66 65 72 73 20 61 20 | 76 65 72 79 20 65 61 73 |ffers a |very eas|
|00002510| 79 20 77 61 79 20 74 6f | 20 68 61 6e 64 6c 65 20 |y way to| handle |
|00002520| 69 6e 6c 69 6e 65 20 69 | 6e 70 75 74 20 66 6f 72 |inline i|nput for|
|00002530| 20 6d 6f 64 61 6c 20 64 | 69 61 6c 6f 67 73 3a 20 | modal d|ialogs: |
|00002540| 79 6f 75 20 73 65 74 20 | 74 68 65 20 72 65 66 43 |you set |the refC|
|00002550| 6f 6e 20 66 69 65 6c 64 | 20 69 6e 20 74 68 65 20 |on field| in the |
|00002560| 44 4c 4f 47 20 72 65 73 | 6f 75 72 63 65 20 74 6f |DLOG res|ource to|
|00002570| 20 6b 54 53 4d 54 45 44 | 69 61 6c 6f 67 20 6f 72 | kTSMTED|ialog or|
|00002580| 20 6b 54 53 4d 54 45 49 | 6e 74 65 72 66 61 63 65 | kTSMTEI|nterface|
|00002590| 54 79 70 65 2c 20 54 53 | 4d 54 45 20 68 61 6e 64 |Type, TS|MTE hand|
|000025a0| 6c 65 73 20 74 68 65 20 | 72 65 73 74 2e 20 4f 72 |les the |rest. Or|
|000025b0| 2c 20 69 66 20 63 69 72 | 63 75 6d 73 74 61 6e 63 |, if cir|cumstanc|
|000025c0| 65 73 20 66 6f 72 63 65 | 20 79 6f 75 20 74 6f 20 |es force| you to |
|000025d0| 63 72 65 61 74 65 20 61 | 20 64 69 61 6c 6f 67 20 |create a| dialog |
|000025e0| 70 72 6f 67 72 61 6d 6d | 61 74 69 63 61 6c 6c 79 |programm|atically|
|000025f0| 2c 20 79 6f 75 20 63 61 | 6e 20 70 61 73 73 20 6b |, you ca|n pass k|
|00002600| 54 53 4d 54 45 49 6e 74 | 65 72 66 61 63 65 54 79 |TSMTEInt|erfaceTy|
|00002610| 70 65 20 61 73 20 74 68 | 65 20 72 65 66 43 6f 6e |pe as th|e refCon|
|00002620| 20 61 72 67 75 6d 65 6e | 74 20 74 6f 20 4e 65 77 | argumen|t to New|
|00002630| 44 69 61 6c 6f 67 20 6f | 72 20 4e 65 77 43 44 69 |Dialog o|r NewCDi|
|00002640| 61 6c 6f 67 20 28 74 68 | 65 73 65 20 72 6f 75 74 |alog (th|ese rout|
|00002650| 69 6e 65 73 20 64 6f 20 | 6e 6f 74 20 61 63 63 65 |ines do |not acce|
|00002660| 70 74 20 6b 54 53 4d 54 | 45 44 69 61 6c 6f 67 29 |pt kTSMT|EDialog)|
|00002670| 2e 20 45 69 74 68 65 72 | 20 77 61 79 2c 20 54 53 |. Either| way, TS|
|00002680| 4d 54 45 20 77 69 6c 6c | 20 61 75 74 6f 6d 61 74 |MTE will| automat|
|00002690| 69 63 61 6c 6c 79 20 63 | 72 65 61 74 65 20 61 20 |ically c|reate a |
|000026a0| 54 53 4d 44 6f 63 75 6d | 65 6e 74 20 66 6f 72 20 |TSMDocum|ent for |
|000026b0| 79 6f 75 2c 20 61 63 74 | 69 76 61 74 65 20 61 6e |you, act|ivate an|
|000026c0| 64 20 64 65 61 63 74 69 | 76 61 74 65 20 74 68 65 |d deacti|vate the|
|000026d0| 20 54 53 4d 44 6f 63 75 | 6d 65 6e 74 2c 20 61 6e | TSMDocu|ment, an|
|000026e0| 64 20 65 6e 61 62 6c 65 | 20 69 6e 6c 69 6e 65 20 |d enable| inline |
|000026f0| 69 6e 70 75 74 20 66 6f | 72 20 74 68 65 20 64 69 |input fo|r the di|
|00002700| 61 6c 6f 67 2e 20 57 68 | 65 6e 20 79 6f 75 20 63 |alog. Wh|en you c|
|00002710| 61 6c 6c 20 43 6c 6f 73 | 65 44 69 61 6c 6f 67 20 |all Clos|eDialog |
|00002720| 6f 72 20 44 69 73 70 6f | 73 65 44 69 61 6c 6f 67 |or Dispo|seDialog|
|00002730| 2c 20 54 53 4d 54 45 20 | 64 69 73 70 6f 73 65 73 |, TSMTE |disposes|
|00002740| 20 6f 66 20 74 68 65 20 | 54 53 4d 44 6f 63 75 6d | of the |TSMDocum|
|00002750| 65 6e 74 20 69 74 20 63 | 72 65 61 74 65 64 2c 20 |ent it c|reated, |
|00002760| 61 63 74 69 76 61 74 65 | 73 20 74 68 65 20 54 53 |activate|s the TS|
|00002770| 4d 44 6f 63 75 6d 65 6e | 74 20 74 68 61 74 20 77 |MDocumen|t that w|
|00002780| 61 73 20 61 63 74 69 76 | 65 20 62 65 66 6f 72 65 |as activ|e before|
|00002790| 20 6f 70 65 6e 69 6e 67 | 20 74 68 65 20 64 69 61 | opening| the dia|
|000027a0| 6c 6f 67 20 28 69 66 20 | 74 68 65 72 65 20 77 61 |log (if |there wa|
|000027b0| 73 20 6f 6e 65 29 2c 20 | 61 6e 64 20 72 65 73 65 |s one), |and rese|
|000027c0| 74 73 20 74 68 65 20 54 | 65 78 74 20 53 65 72 76 |ts the T|ext Serv|
|000027d0| 69 63 65 73 20 4d 61 6e | 61 67 65 72 20 66 6c 61 |ices Man|ager fla|
|000027e0| 67 20 74 68 61 74 20 64 | 65 74 65 72 6d 69 6e 65 |g that d|etermine|
|000027f0| 73 20 77 68 65 74 68 65 | 72 20 74 6f 20 75 73 65 |s whethe|r to use|
|00002800| 20 74 68 65 20 66 6c 6f | 61 74 69 6e 67 20 69 6e | the flo|ating in|
|00002810| 70 75 74 20 77 69 6e 64 | 6f 77 20 74 6f 20 69 74 |put wind|ow to it|
|00002820| 73 20 70 72 65 76 69 6f | 75 73 20 73 74 61 74 65 |s previo|us state|
|00002830| 2e 0d 4e 6f 74 65 3a 09 | 49 66 20 79 6f 75 20 75 |..Note:.|If you u|
|00002840| 73 65 20 74 68 69 73 20 | 66 65 61 74 75 72 65 2c |se this |feature,|
|00002850| 20 79 6f 75 20 63 61 6e | 20 73 74 69 6c 6c 20 75 | you can| still u|
|00002860| 73 65 20 74 68 65 20 72 | 65 66 43 6f 6e 20 66 69 |se the r|efCon fi|
|00002870| 65 6c 64 20 66 6f 72 20 | 79 6f 75 72 20 6f 77 6e |eld for |your own|
|00002880| 20 70 75 72 70 6f 73 65 | 73 20 61 66 74 65 72 20 | purpose|s after |
|00002890| 63 72 65 61 74 69 6e 67 | 20 74 68 65 20 64 69 61 |creating| the dia|
|000028a0| 6c 6f 67 20 d0 20 54 53 | 4d 54 45 20 64 6f 65 73 |log . TS|MTE does|
|000028b0| 6e d5 74 20 6e 65 65 64 | 20 69 74 20 61 6e 79 20 |n.t need| it any |
|000028c0| 6c 6f 6e 67 65 72 2e 0d | 54 68 65 20 64 69 66 66 |longer..|The diff|
|000028d0| 65 72 65 6e 63 65 20 62 | 65 74 77 65 65 6e 20 74 |erence b|etween t|
|000028e0| 68 65 20 74 77 6f 20 63 | 6f 6e 73 74 61 6e 74 73 |he two c|onstants|
|000028f0| 20 69 73 20 74 68 61 74 | 20 6b 54 53 4d 54 45 49 | is that| kTSMTEI|
|00002900| 6e 74 65 72 66 61 63 65 | 54 79 70 65 20 74 65 6c |nterface|Type tel|
|00002910| 6c 73 20 54 53 4d 54 45 | 20 74 6f 20 75 73 65 20 |ls TSMTE| to use |
|00002920| 61 6e 20 65 78 74 65 6e | 64 65 64 20 64 69 61 6c |an exten|ded dial|
|00002930| 6f 67 20 72 65 63 6f 72 | 64 2c 20 54 53 4d 44 69 |og recor|d, TSMDi|
|00002940| 61 6c 6f 67 52 65 63 6f | 72 64 2c 20 77 68 69 6c |alogReco|rd, whil|
|00002950| 65 20 6b 54 53 4d 54 45 | 44 69 61 6c 6f 67 20 75 |e kTSMTE|Dialog u|
|00002960| 73 65 73 20 74 68 65 20 | 73 74 61 6e 64 61 72 64 |ses the |standard|
|00002970| 20 64 69 61 6c 6f 67 20 | 72 65 63 6f 72 64 2e 20 | dialog |record. |
|00002980| 55 73 69 6e 67 20 74 68 | 65 20 65 78 74 65 6e 64 |Using th|e extend|
|00002990| 65 64 20 64 69 61 6c 6f | 67 20 72 65 63 6f 72 64 |ed dialo|g record|
|000029a0| 20 6c 65 74 73 20 79 6f | 75 20 61 63 63 65 73 73 | lets yo|u access|
|000029b0| 20 74 68 65 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e | the inf|ormation|
|000029c0| 20 74 68 61 74 20 54 53 | 4d 54 45 20 75 73 65 73 | that TS|MTE uses|
|000029d0| 20 69 66 20 79 6f 75 20 | 6e 65 65 64 20 69 74 3b | if you |need it;|
|000029e0| 20 77 69 74 68 6f 75 74 | 20 69 74 2c 20 74 68 65 | without| it, the|
|000029f0| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 69 73 20 | informa|tion is |
|00002a00| 73 74 6f 72 65 64 20 69 | 6e 20 54 53 4d 54 45 d5 |stored i|n TSMTE.|
|00002a10| 73 20 70 72 69 76 61 74 | 65 20 64 61 74 61 20 73 |s privat|e data s|
|00002a20| 74 72 75 63 74 75 72 65 | 73 2e 20 49 66 20 79 6f |tructure|s. If yo|
|00002a30| 75 20 75 73 65 20 6b 54 | 53 4d 54 45 49 6e 74 65 |u use kT|SMTEInte|
|00002a40| 72 66 61 63 65 54 79 70 | 65 20 62 75 74 20 64 6f |rfaceTyp|e but do|
|00002a50| 6e d5 74 20 70 72 6f 76 | 69 64 65 20 73 74 6f 72 |n.t prov|ide stor|
|00002a60| 61 67 65 20 66 6f 72 20 | 74 68 65 20 64 69 61 6c |age for |the dial|
|00002a70| 6f 67 20 72 65 63 6f 72 | 64 2c 20 74 68 65 20 44 |og recor|d, the D|
|00002a80| 69 61 6c 6f 67 20 4d 61 | 6e 61 67 65 72 20 72 6f |ialog Ma|nager ro|
|00002a90| 75 74 69 6e 65 73 20 77 | 69 6c 6c 20 61 75 74 6f |utines w|ill auto|
|00002aa0| 6d 61 74 69 63 61 6c 6c | 79 20 61 6c 6c 6f 63 61 |maticall|y alloca|
|00002ab0| 74 65 20 61 6e 20 65 78 | 74 65 6e 64 65 64 20 72 |te an ex|tended r|
|00002ac0| 65 63 6f 72 64 2e 0d 49 | 66 20 79 6f 75 20 75 73 |ecord..I|f you us|
|00002ad0| 65 20 6b 54 53 4d 54 45 | 49 6e 74 65 72 66 61 63 |e kTSMTE|Interfac|
|00002ae0| 65 54 79 70 65 20 61 6e | 64 20 61 6c 6c 6f 63 61 |eType an|d alloca|
|00002af0| 74 65 20 79 6f 75 72 20 | 6f 77 6e 20 73 74 6f 72 |te your |own stor|
|00002b00| 61 67 65 20 6f 72 20 61 | 64 64 20 79 6f 75 72 20 |age or a|dd your |
|00002b10| 6f 77 6e 20 66 69 65 6c | 64 73 20 74 6f 20 74 68 |own fiel|ds to th|
|00002b20| 65 20 64 69 61 6c 6f 67 | 20 72 65 63 6f 72 64 2c |e dialog| record,|
|00002b30| 20 79 6f 75 20 68 61 76 | 65 20 74 6f 20 74 61 6b | you hav|e to tak|
|00002b40| 65 20 74 68 65 20 61 64 | 64 69 74 69 6f 6e 61 6c |e the ad|ditional|
|00002b50| 20 32 30 20 62 79 74 65 | 73 20 6f 66 20 74 68 65 | 20 byte|s of the|
|00002b60| 20 65 78 74 65 6e 64 65 | 64 20 64 69 61 6c 6f 67 | extende|d dialog|
|00002b70| 20 72 65 63 6f 72 64 20 | 69 6e 74 6f 20 61 63 63 | record |into acc|
|00002b80| 6f 75 6e 74 2e 20 49 66 | 20 79 6f 75 20 61 64 64 |ount. If| you add|
|00002b90| 20 79 6f 75 72 20 6f 77 | 6e 20 66 69 65 6c 64 73 | your ow|n fields|
|00002ba0| 2c 20 69 74 d5 73 20 61 | 20 67 6f 6f 64 20 69 64 |, it.s a| good id|
|00002bb0| 65 61 20 74 6f 20 61 6c | 73 6f 20 61 6c 6c 6f 63 |ea to al|so alloc|
|00002bc0| 61 74 65 20 79 6f 75 72 | 20 6f 77 6e 20 73 74 6f |ate your| own sto|
|00002bd0| 72 61 67 65 2e 20 54 68 | 69 73 20 77 61 79 20 79 |rage. Th|is way y|
|00002be0| 6f 75 20 63 61 6e 20 61 | 6c 77 61 79 73 20 69 6e |ou can a|lways in|
|00002bf0| 63 6c 75 64 65 20 74 68 | 65 20 66 69 65 6c 64 73 |clude th|e fields|
|00002c00| 20 66 6f 72 20 54 53 4d | 54 45 2c 20 6f 74 68 65 | for TSM|TE, othe|
|00002c10| 72 77 69 73 65 20 74 68 | 65 20 6c 6f 63 61 74 69 |rwise th|e locati|
|00002c20| 6f 6e 20 6f 66 20 79 6f | 75 72 20 66 69 65 6c 64 |on of yo|ur field|
|00002c30| 73 20 69 6e 20 74 68 65 | 20 72 65 63 6f 72 64 20 |s in the| record |
|00002c40| 64 65 70 65 6e 64 73 20 | 6f 6e 20 77 68 65 74 68 |depends |on wheth|
|00002c50| 65 72 20 54 53 4d 54 45 | 20 69 73 20 69 6e 73 74 |er TSMTE| is inst|
|00002c60| 61 6c 6c 65 64 20 6f 72 | 20 6e 6f 74 2e 0d 49 66 |alled or| not..If|
|00002c70| 20 79 6f 75 20 70 72 6f | 76 69 64 65 20 61 6e 20 | you pro|vide an |
|00002c80| 65 76 65 6e 74 20 66 69 | 6c 74 65 72 20 66 75 6e |event fi|lter fun|
|00002c90| 63 74 69 6f 6e 20 66 6f | 72 20 4d 6f 64 61 6c 44 |ction fo|r ModalD|
|00002ca0| 69 61 6c 6f 67 2c 20 54 | 53 4d 54 45 20 67 69 76 |ialog, T|SMTE giv|
|00002cb0| 65 73 20 79 6f 75 20 74 | 68 65 20 63 68 6f 69 63 |es you t|he choic|
|00002cc0| 65 20 77 68 65 74 68 65 | 72 20 79 6f 75 20 77 61 |e whethe|r you wa|
|00002cd0| 6e 74 20 74 6f 20 68 61 | 6e 64 6c 65 20 54 65 78 |nt to ha|ndle Tex|
|00002ce0| 74 20 53 65 72 76 69 63 | 65 73 20 4d 61 6e 61 67 |t Servic|es Manag|
|00002cf0| 65 72 20 63 61 6c 6c 73 | 20 6f 72 20 77 68 65 74 |er calls| or whet|
|00002d00| 68 65 72 20 54 53 4d 54 | 45 20 73 68 6f 75 6c 64 |her TSMT|E should|
|00002d10| 20 64 6f 20 69 74 2e 20 | 54 6f 20 64 65 74 65 72 | do it. |To deter|
|00002d20| 6d 69 6e 65 20 77 68 65 | 74 68 65 72 20 74 68 65 |mine whe|ther the|
|00002d30| 20 66 75 6e 63 74 69 6f | 6e 20 68 61 6e 64 6c 65 | functio|n handle|
|00002d40| 73 20 74 68 65 20 63 61 | 6c 6c 73 2c 20 54 53 4d |s the ca|lls, TSM|
|00002d50| 54 45 20 63 61 6c 6c 73 | 20 69 74 20 77 69 74 68 |TE calls| it with|
|00002d60| 20 61 20 6e 75 6c 6c 20 | 65 76 65 6e 74 2e 20 49 | a null |event. I|
|00002d70| 66 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 63 |f the fu|nction c|
|00002d80| 61 6c 6c 73 20 54 53 4d | 45 76 65 6e 74 2c 20 54 |alls TSM|Event, T|
|00002d90| 53 4d 54 45 20 61 73 73 | 75 6d 65 73 20 74 68 61 |SMTE ass|umes tha|
|00002da0| 74 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 6d |t the fu|nction m|
|00002db0| 61 6b 65 73 20 61 6c 6c | 20 74 68 65 20 6e 65 63 |akes all| the nec|
|00002dc0| 65 73 73 61 72 79 20 63 | 61 6c 6c 73 20 74 6f 20 |essary c|alls to |
|00002dd0| 74 68 65 20 54 65 78 74 | 20 53 65 72 76 69 63 65 |the Text| Service|
|00002de0| 73 20 4d 61 6e 61 67 65 | 72 2e 20 49 66 20 69 74 |s Manage|r. If it|
|00002df0| 20 64 6f 65 73 6e d5 74 | 2c 20 6f 72 20 69 66 20 | doesn.t|, or if |
|00002e00| 74 68 65 72 65 20 69 73 | 20 6e 6f 20 65 76 65 6e |there is| no even|
|00002e10| 74 20 66 69 6c 74 65 72 | 20 66 75 6e 63 74 69 6f |t filter| functio|
|00002e20| 6e 2c 20 54 53 4d 54 45 | 20 6d 61 6b 65 73 20 61 |n, TSMTE| makes a|
|00002e30| 6c 6c 20 74 68 65 20 6e | 65 63 65 73 73 61 72 79 |ll the n|ecessary|
|00002e40| 20 63 61 6c 6c 73 20 69 | 74 73 65 6c 66 2e 0d 57 | calls i|tself..W|
|00002e50| 68 69 6c 65 20 75 73 69 | 6e 67 20 69 6e 6c 69 6e |hile usi|ng inlin|
|00002e60| 65 20 69 6e 70 75 74 2c | 20 4d 6f 64 61 6c 44 69 |e input,| ModalDi|
|00002e70| 61 6c 6f 67 20 64 6f 65 | 73 6e d5 74 20 72 65 74 |alog doe|sn.t ret|
|00002e80| 75 72 6e 20 62 65 63 61 | 75 73 65 20 69 74 20 64 |urn beca|use it d|
|00002e90| 6f 65 73 6e d5 74 20 67 | 65 74 20 74 6f 20 73 65 |oesn.t g|et to se|
|00002ea0| 65 20 61 6e 79 20 d2 72 | 65 61 6c d3 20 65 76 65 |e any .r|eal. eve|
|00002eb0| 6e 74 73 2e 20 49 66 20 | 79 6f 75 20 68 61 76 65 |nts. If |you have|
|00002ec0| 20 61 20 64 69 61 6c 6f | 67 20 74 68 61 74 20 6f | a dialo|g that o|
|00002ed0| 70 65 6e 73 20 77 69 74 | 68 20 61 20 64 69 73 61 |pens wit|h a disa|
|00002ee0| 62 6c 65 64 20 61 63 74 | 69 6f 6e 20 62 75 74 74 |bled act|ion butt|
|00002ef0| 6f 6e 20 61 6e 64 20 77 | 61 69 74 73 20 66 6f 72 |on and w|aits for|
|00002f00| 20 74 68 65 20 75 73 65 | 72 20 74 6f 20 74 79 70 | the use|r to typ|
|00002f10| 65 20 74 65 78 74 20 69 | 6e 74 6f 20 61 6e 20 65 |e text i|nto an e|
|00002f20| 64 69 74 61 62 6c 65 20 | 74 65 78 74 20 69 74 65 |ditable |text ite|
|00002f30| 6d 20 62 65 66 6f 72 65 | 20 65 6e 61 62 6c 69 6e |m before| enablin|
|00002f40| 67 20 74 68 65 20 62 75 | 74 74 6f 6e 2c 20 63 68 |g the bu|tton, ch|
|00002f50| 65 63 6b 69 6e 67 20 74 | 68 65 20 65 64 69 74 61 |ecking t|he edita|
|00002f60| 62 6c 65 20 74 65 78 74 | 20 69 74 65 6d 20 6f 6e |ble text| item on|
|00002f70| 6c 79 20 61 66 74 65 72 | 20 4d 6f 64 61 6c 44 69 |ly after| ModalDi|
|00002f80| 61 6c 6f 67 20 72 65 74 | 75 72 6e 73 20 64 6f 65 |alog ret|urns doe|
|00002f90| 73 20 6e 6f 74 20 68 61 | 76 65 20 74 68 65 20 64 |s not ha|ve the d|
|00002fa0| 65 73 69 72 65 64 20 65 | 66 66 65 63 74 20 d0 20 |esired e|ffect . |
|00002fb0| 69 66 20 74 68 65 20 75 | 73 65 72 20 75 73 65 73 |if the u|ser uses|
|00002fc0| 20 69 6e 6c 69 6e 65 20 | 69 6e 70 75 74 20 74 6f | inline |input to|
|00002fd0| 20 65 6e 74 65 72 20 74 | 65 78 74 2c 20 74 68 65 | enter t|ext, the|
|00002fe0| 20 62 75 74 74 6f 6e 20 | 64 6f 65 73 6e d5 74 20 | button |doesn.t |
|00002ff0| 67 65 74 20 65 6e 61 62 | 6c 65 64 2e 20 41 20 73 |get enab|led. A s|
|00003000| 6f 6c 75 74 69 6f 6e 20 | 66 6f 72 20 74 68 69 73 |olution |for this|
|00003010| 20 69 73 20 74 6f 20 75 | 73 65 20 61 6e 20 65 76 | is to u|se an ev|
|00003020| 65 6e 74 20 66 69 6c 74 | 65 72 20 66 75 6e 63 74 |ent filt|er funct|
|00003030| 69 6f 6e 20 74 68 61 74 | 20 63 68 65 63 6b 73 20 |ion that| checks |
|00003040| 74 68 65 20 74 65 78 74 | 20 69 6e 20 74 68 65 20 |the text| in the |
|00003050| 65 64 69 74 61 62 6c 65 | 20 74 65 78 74 20 69 74 |editable| text it|
|00003060| 65 6d 20 61 6e 64 20 65 | 6e 61 62 6c 65 73 20 74 |em and e|nables t|
|00003070| 68 65 20 62 75 74 74 6f | 6e 20 69 66 20 74 68 65 |he butto|n if the|
|00003080| 20 74 65 78 74 20 6c 65 | 6e 67 74 68 20 69 73 20 | text le|ngth is |
|00003090| 61 62 6f 76 65 20 7a 65 | 72 6f 2e 20 54 68 65 20 |above ze|ro. The |
|000030a0| 65 76 65 6e 74 20 66 69 | 6c 74 65 72 20 66 75 6e |event fi|lter fun|
|000030b0| 63 74 69 6f 6e 20 69 73 | 20 67 75 61 72 61 6e 74 |ction is| guarant|
|000030c0| 65 65 64 20 74 6f 20 62 | 65 20 63 61 6c 6c 65 64 |eed to b|e called|
|000030d0| 20 77 69 74 68 20 61 20 | 6e 75 6c 6c 20 65 76 65 | with a |null eve|
|000030e0| 6e 74 20 77 68 65 6e 65 | 76 65 72 20 54 53 4d 45 |nt whene|ver TSME|
|000030f0| 76 65 6e 74 20 63 6f 6e | 73 75 6d 65 73 20 61 20 |vent con|sumes a |
|00003100| 6b 65 79 44 6f 77 6e 20 | 65 76 65 6e 74 2e 0d 55 |keyDown |event..U|
|00003110| 73 69 6e 67 20 54 53 4d | 54 45 20 66 6f 72 20 44 |sing TSM|TE for D|
|00003120| 6f 63 75 6d 65 6e 74 20 | 57 69 6e 64 6f 77 73 20 |ocument |Windows |
|00003130| 61 6e 64 20 66 6f 72 20 | 4d 6f 64 65 6c 65 73 73 |and for |Modeless|
|00003140| 20 44 69 61 6c 6f 67 73 | 0d 49 66 20 79 6f 75 20 | Dialogs|.If you |
|00003150| 75 73 65 20 54 65 78 74 | 45 64 69 74 20 74 6f 20 |use Text|Edit to |
|00003160| 65 64 69 74 20 74 65 78 | 74 20 69 6e 20 64 6f 63 |edit tex|t in doc|
|00003170| 75 6d 65 6e 74 20 77 69 | 6e 64 6f 77 73 20 6f 72 |ument wi|ndows or|
|00003180| 20 69 66 20 79 6f 75 20 | 75 73 65 20 6d 6f 64 65 | if you |use mode|
|00003190| 6c 65 73 73 20 64 69 61 | 6c 6f 67 73 2c 20 73 6f |less dia|logs, so|
|000031a0| 6d 65 20 6d 6f 72 65 20 | 77 6f 72 6b 20 69 73 20 |me more |work is |
|000031b0| 73 68 69 66 74 65 64 20 | 6f 76 65 72 20 74 6f 20 |shifted |over to |
|000031c0| 79 6f 75 3a 20 6e 6f 77 | 20 69 74 20 62 65 63 6f |you: now| it beco|
|000031d0| 6d 65 73 20 79 6f 75 72 | 20 72 65 73 70 6f 6e 73 |mes your| respons|
|000031e0| 69 62 69 6c 69 74 79 20 | 74 6f 20 63 61 6c 6c 20 |ibility |to call |
|000031f0| 74 68 65 20 68 69 67 68 | 2d 6c 65 76 65 6c 20 54 |the high|-level T|
|00003200| 65 78 74 20 53 65 72 76 | 69 63 65 73 20 4d 61 6e |ext Serv|ices Man|
|00003210| 61 67 65 72 20 72 6f 75 | 74 69 6e 65 73 2e 20 59 |ager rou|tines. Y|
|00003220| 6f 75 d5 6c 6c 20 68 61 | 76 65 20 74 6f 20 61 64 |ou.ll ha|ve to ad|
|00003230| 64 20 63 61 6c 6c 73 20 | 74 6f 3a 0d 4e 65 77 54 |d calls |to:.NewT|
|00003240| 53 4d 44 6f 63 75 6d 65 | 6e 74 0d 44 65 6c 65 74 |SMDocume|nt.Delet|
|00003250| 65 54 53 4d 44 6f 63 75 | 6d 65 6e 74 0d 41 63 74 |eTSMDocu|ment.Act|
|00003260| 69 76 61 74 65 54 53 4d | 44 6f 63 75 6d 65 6e 74 |ivateTSM|Document|
|00003270| 0d 44 65 61 63 74 69 76 | 61 74 65 54 53 4d 44 6f |.Deactiv|ateTSMDo|
|00003280| 63 75 6d 65 6e 74 0d 54 | 53 4d 45 76 65 6e 74 0d |cument.T|SMEvent.|
|00003290| 54 53 4d 4d 65 6e 75 53 | 65 6c 65 63 74 0d 53 65 |TSMMenuS|elect.Se|
|000032a0| 74 54 53 4d 43 75 72 73 | 6f 72 0d 46 69 78 54 53 |tTSMCurs|or.FixTS|
|000032b0| 4d 44 6f 63 75 6d 65 6e | 74 0d 42 65 66 6f 72 65 |MDocumen|t.Before|
|000032c0| 20 6d 61 6b 69 6e 67 20 | 74 68 65 20 54 65 78 74 | making |the Text|
|000032d0| 20 53 65 72 76 69 63 65 | 73 20 4d 61 6e 61 67 65 | Service|s Manage|
|000032e0| 72 20 63 61 6c 6c 73 2c | 20 79 6f 75 20 68 61 76 |r calls,| you hav|
|000032f0| 65 20 74 6f 20 6d 61 6b | 65 20 73 75 72 65 20 74 |e to mak|e sure t|
|00003300| 68 61 74 20 74 68 65 69 | 72 20 70 72 65 63 6f 6e |hat thei|r precon|
|00003310| 64 69 74 69 6f 6e 73 20 | 61 72 65 20 6d 65 74 2e |ditions |are met.|
|00003320| 20 59 6f 75 20 6f 6e 6c | 79 20 77 61 6e 74 20 74 | You onl|y want t|
|00003330| 6f 20 63 72 65 61 74 65 | 20 61 20 54 53 4d 20 64 |o create| a TSM d|
|00003340| 6f 63 75 6d 65 6e 74 20 | 66 6f 72 20 61 20 54 65 |ocument |for a Te|
|00003350| 78 74 45 64 69 74 20 74 | 65 78 74 20 72 65 63 6f |xtEdit t|ext reco|
|00003360| 72 64 20 69 66 20 54 53 | 4d 54 45 20 69 73 20 61 |rd if TS|MTE is a|
|00003370| 76 61 69 6c 61 62 6c 65 | 2e 20 59 6f 75 20 6f 6e |vailable|. You on|
|00003380| 6c 79 20 77 61 6e 74 20 | 74 6f 20 64 65 6c 65 74 |ly want |to delet|
|00003390| 65 2c 20 61 63 74 69 76 | 61 74 65 2c 20 6f 72 20 |e, activ|ate, or |
|000033a0| 64 65 61 63 74 69 76 61 | 74 65 2c 20 6f 72 20 63 |deactiva|te, or c|
|000033b0| 6f 6e 66 69 72 6d 20 28 | d2 66 69 78 d3 29 20 61 |onfirm (|.fix.) a|
|000033c0| 20 54 53 4d 20 64 6f 63 | 75 6d 65 6e 74 20 69 66 | TSM doc|ument if|
|000033d0| 20 63 72 65 61 74 69 6e | 67 20 69 74 20 77 61 73 | creatin|g it was|
|000033e0| 20 73 75 63 63 65 73 73 | 66 75 6c 2e 20 54 68 65 | success|ful. The|
|000033f0| 20 72 65 6d 61 69 6e 69 | 6e 67 20 72 6f 75 74 69 | remaini|ng routi|
|00003400| 6e 65 73 20 64 65 70 65 | 6e 64 20 6f 6e 20 74 68 |nes depe|nd on th|
|00003410| 65 20 54 65 78 74 20 53 | 65 72 76 69 63 65 73 20 |e Text S|ervices |
|00003420| 4d 61 6e 61 67 65 72 20 | 62 65 69 6e 67 20 61 76 |Manager |being av|
|00003430| 61 69 6c 61 62 6c 65 2c | 20 62 75 74 20 6e 6f 74 |ailable,| but not|
|00003440| 20 6e 65 63 65 73 73 61 | 72 69 6c 79 20 6f 6e 20 | necessa|rily on |
|00003450| 54 53 4d 54 45 20 d0 20 | 79 6f 75 20 6d 61 79 20 |TSMTE . |you may |
|00003460| 62 65 20 75 73 69 6e 67 | 20 79 6f 75 72 20 6f 77 |be using| your ow|
|00003470| 6e 20 74 65 78 74 20 65 | 6e 67 69 6e 65 20 77 69 |n text e|ngine wi|
|00003480| 74 68 20 69 6e 6c 69 6e | 65 20 69 6e 70 75 74 20 |th inlin|e input |
|00003490| 69 6e 20 61 64 64 69 74 | 69 6f 6e 20 74 6f 20 54 |in addit|ion to T|
|000034a0| 65 78 74 45 64 69 74 2e | 20 54 68 65 20 76 61 72 |extEdit.| The var|
|000034b0| 69 61 62 6c 65 73 20 67 | 48 61 73 54 65 78 74 53 |iables g|HasTextS|
|000034c0| 65 72 76 69 63 65 73 20 | 61 6e 64 20 67 48 61 73 |ervices |and gHas|
|000034d0| 54 53 4d 54 45 20 69 6e | 74 72 6f 64 75 63 65 64 |TSMTE in|troduced|
|000034e0| 20 61 62 6f 76 65 20 63 | 61 6e 20 68 65 6c 70 20 | above c|an help |
|000034f0| 79 6f 75 20 6d 61 6b 65 | 20 74 68 65 20 6e 65 63 |you make| the nec|
|00003500| 65 73 73 61 72 79 20 64 | 65 63 69 73 69 6f 6e 73 |essary d|ecisions|
|00003510| 2e 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 79 |. For ex|ample, y|
|00003520| 6f 75 72 20 6d 65 6e 75 | 20 68 61 6e 64 6c 69 6e |our menu| handlin|
|00003530| 67 20 63 6f 64 65 20 6d | 69 67 68 74 20 6c 6f 6f |g code m|ight loo|
|00003540| 6b 20 6c 69 6b 65 20 74 | 68 69 73 3a 0d 6d 65 6e |k like t|his:.men|
|00003550| 75 52 65 73 75 6c 74 20 | 3d 20 4d 65 6e 75 53 65 |uResult |= MenuSe|
|00003560| 6c 65 63 74 28 65 76 65 | 6e 74 2d 3e 77 68 65 72 |lect(eve|nt->wher|
|00003570| 65 29 3b 0d 69 66 20 28 | 21 28 67 48 61 73 54 65 |e);.if (|!(gHasTe|
|00003580| 78 74 53 65 72 76 69 63 | 65 73 20 26 26 20 54 53 |xtServic|es && TS|
|00003590| 4d 4d 65 6e 75 53 65 6c | 65 63 74 28 6d 65 6e 75 |MMenuSel|ect(menu|
|000035a0| 52 65 73 75 6c 74 29 29 | 29 0d 09 44 6f 4d 65 6e |Result))|)..DoMen|
|000035b0| 75 43 6f 6d 6d 61 6e 64 | 28 6d 65 6e 75 52 65 73 |uCommand|(menuRes|
|000035c0| 75 6c 74 29 3b 0d 48 69 | 6c 69 74 65 4d 65 6e 75 |ult);.Hi|liteMenu|
|000035d0| 28 30 29 3b 0d 54 68 65 | 20 75 73 61 67 65 20 6f |(0);.The| usage o|
|000035e0| 66 20 54 65 78 74 20 53 | 65 72 76 69 63 65 73 20 |f Text S|ervices |
|000035f0| 4d 61 6e 61 67 65 72 20 | 72 6f 75 74 69 6e 65 73 |Manager |routines|
|00003600| 20 69 73 20 64 6f 63 75 | 6d 65 6e 74 65 64 20 69 | is docu|mented i|
|00003610| 6e 20 49 6e 73 69 64 65 | 20 4d 61 63 69 6e 74 6f |n Inside| Macinto|
|00003620| 73 68 3a 20 54 65 78 74 | 2c 20 73 6f 20 77 65 d5 |sh: Text|, so we.|
|00003630| 6c 6c 20 64 69 73 63 75 | 73 73 20 6f 6e 6c 79 20 |ll discu|ss only |
|00003640| 68 6f 77 20 54 53 4d 54 | 45 20 65 78 74 65 6e 64 |how TSMT|E extend|
|00003650| 73 20 74 68 65 20 54 65 | 78 74 20 53 65 72 76 69 |s the Te|xt Servi|
|00003660| 63 65 73 20 4d 61 6e 61 | 67 65 72 20 69 6e 74 65 |ces Mana|ger inte|
|00003670| 72 66 61 63 65 2e 0d 43 | 72 65 61 74 69 6e 67 20 |rface..C|reating |
|00003680| 61 20 54 53 4d 20 44 6f | 63 75 6d 65 6e 74 0d 57 |a TSM Do|cument.W|
|00003690| 68 65 6e 20 63 72 65 61 | 74 69 6e 67 20 61 20 54 |hen crea|ting a T|
|000036a0| 53 4d 44 6f 63 75 6d 65 | 6e 74 20 66 6f 72 20 61 |SMDocume|nt for a|
|000036b0| 20 54 65 78 74 45 64 69 | 74 20 74 65 78 74 20 72 | TextEdi|t text r|
|000036c0| 65 63 6f 72 64 2c 20 79 | 6f 75 20 68 61 76 65 20 |ecord, y|ou have |
|000036d0| 74 6f 20 75 73 65 20 61 | 20 73 70 65 63 69 61 6c |to use a| special|
|000036e0| 20 69 6e 74 65 72 66 61 | 63 65 20 74 79 70 65 20 | interfa|ce type |
|000036f0| 6b 54 53 4d 54 45 49 6e | 74 65 72 66 61 63 65 54 |kTSMTEIn|terfaceT|
|00003700| 79 70 65 20 74 6f 20 69 | 6e 64 69 63 61 74 65 20 |ype to i|ndicate |
|00003710| 74 68 61 74 20 54 53 4d | 54 45 20 73 68 6f 75 6c |that TSM|TE shoul|
|00003720| 64 20 68 61 6e 64 6c 65 | 20 41 70 70 6c 65 20 65 |d handle| Apple e|
|00003730| 76 65 6e 74 73 20 66 6f | 72 20 74 68 69 73 20 54 |vents fo|r this T|
|00003740| 53 4d 20 64 6f 63 75 6d | 65 6e 74 2e 0d 49 66 20 |SM docum|ent..If |
|00003750| 79 6f 75 20 70 61 73 73 | 20 6b 54 53 4d 54 45 49 |you pass| kTSMTEI|
|00003760| 6e 74 65 72 66 61 63 65 | 54 79 70 65 20 74 6f 20 |nterface|Type to |
|00003770| 4e 65 77 54 53 4d 44 6f | 63 75 6d 65 6e 74 2c 20 |NewTSMDo|cument, |
|00003780| 74 68 65 20 72 65 66 43 | 6f 6e 20 61 72 67 75 6d |the refC|on argum|
|00003790| 65 6e 74 20 74 61 6b 65 | 73 20 6f 6e 20 61 20 64 |ent take|s on a d|
|000037a0| 69 66 66 65 72 65 6e 74 | 20 6d 65 61 6e 69 6e 67 |ifferent| meaning|
|000037b0| 2e 20 49 6e 73 74 65 61 | 64 20 6f 66 20 61 20 76 |. Instea|d of a v|
|000037c0| 61 6c 75 65 20 74 6f 20 | 62 65 20 73 74 6f 72 65 |alue to |be store|
|000037d0| 64 20 69 6e 20 74 68 65 | 20 54 53 4d 20 64 6f 63 |d in the| TSM doc|
|000037e0| 75 6d 65 6e 74 2c 20 79 | 6f 75 20 73 68 6f 75 6c |ument, y|ou shoul|
|000037f0| 64 20 70 61 73 73 20 69 | 6e 20 74 68 65 20 61 64 |d pass i|n the ad|
|00003800| 64 72 65 73 73 20 6f 66 | 20 61 20 76 61 72 69 61 |dress of| a varia|
|00003810| 62 6c 65 20 6f 66 20 74 | 79 70 65 20 54 53 4d 54 |ble of t|ype TSMT|
|00003820| 45 52 65 63 48 61 6e 64 | 6c 65 2e 20 54 53 4d 54 |ERecHand|le. TSMT|
|00003830| 45 20 61 6c 6c 6f 63 61 | 74 65 73 20 61 20 64 61 |E alloca|tes a da|
|00003840| 74 61 20 73 74 72 75 63 | 74 75 72 65 20 6f 66 20 |ta struc|ture of |
|00003850| 74 79 70 65 20 54 53 4d | 54 45 52 65 63 20 61 6e |type TSM|TERec an|
|00003860| 64 20 61 73 73 69 67 6e | 73 20 61 20 68 61 6e 64 |d assign|s a hand|
|00003870| 6c 65 20 74 6f 20 69 74 | 20 74 6f 20 79 6f 75 72 |le to it| to your|
|00003880| 20 76 61 72 69 61 62 6c | 65 2e 20 54 68 69 73 20 | variabl|e. This |
|00003890| 64 61 74 61 20 73 74 72 | 75 63 74 75 72 65 20 63 |data str|ucture c|
|000038a0| 6f 6e 74 61 69 6e 73 20 | 73 65 76 65 72 61 6c 20 |ontains |several |
|000038b0| 66 69 65 6c 64 73 20 74 | 68 61 74 20 79 6f 75 20 |fields t|hat you |
|000038c0| 63 61 6e 20 75 73 65 20 | 74 6f 20 74 61 69 6c 6f |can use |to tailo|
|000038d0| 72 20 54 53 4d 54 45 d5 | 73 20 62 65 68 61 76 69 |r TSMTE.|s behavi|
|000038e0| 6f 72 20 74 6f 20 74 68 | 65 20 6e 65 65 64 73 20 |or to th|e needs |
|000038f0| 6f 66 20 79 6f 75 72 20 | 61 70 70 6c 69 63 61 74 |of your |applicat|
|00003900| 69 6f 6e 2e 20 49 74 20 | 69 73 20 79 6f 75 72 20 |ion. It |is your |
|00003910| 61 70 70 6c 69 63 61 74 | 69 6f 6e d5 73 20 72 65 |applicat|ion.s re|
|00003920| 73 70 6f 6e 73 69 62 69 | 6c 69 74 79 20 74 6f 20 |sponsibi|lity to |
|00003930| 69 6e 69 74 69 61 6c 69 | 7a 65 20 74 68 65 20 72 |initiali|ze the r|
|00003940| 65 63 6f 72 64 2e 0d 73 | 74 72 75 63 74 20 54 53 |ecord..s|truct TS|
|00003950| 4d 54 45 52 65 63 20 7b | 0d 09 54 45 48 61 6e 64 |MTERec {|..TEHand|
|00003960| 6c 65 09 09 09 09 09 74 | 65 78 74 48 3b 0d 09 54 |le.....t|extH;..T|
|00003970| 53 4d 54 45 50 72 65 55 | 70 64 61 74 65 55 50 50 |SMTEPreU|pdateUPP|
|00003980| 09 09 70 72 65 55 70 64 | 61 74 65 50 72 6f 63 3b |..preUpd|ateProc;|
|00003990| 0d 09 54 53 4d 54 45 50 | 6f 73 74 55 70 64 61 74 |..TSMTEP|ostUpdat|
|000039a0| 65 55 50 50 09 70 6f 73 | 74 55 70 64 61 74 65 50 |eUPP.pos|tUpdateP|
|000039b0| 72 6f 63 3b 0d 09 6c 6f | 6e 67 09 09 09 09 09 09 |roc;..lo|ng......|
|000039c0| 75 70 64 61 74 65 46 6c | 61 67 3b 0d 09 6c 6f 6e |updateFl|ag;..lon|
|000039d0| 67 09 09 09 09 09 09 72 | 65 66 43 6f 6e 3b 0d 7d |g......r|efCon;.}|
|000039e0| 3b 0d 54 68 65 20 74 65 | 78 74 48 20 66 69 65 6c |;.The te|xtH fiel|
|000039f0| 64 20 68 61 73 20 74 6f | 20 62 65 20 73 65 74 20 |d has to| be set |
|00003a00| 74 6f 20 74 68 65 20 74 | 65 78 74 20 72 65 63 6f |to the t|ext reco|
|00003a10| 72 64 20 68 61 6e 64 6c | 65 20 74 68 61 74 20 74 |rd handl|e that t|
|00003a20| 68 69 73 20 54 53 4d 20 | 64 6f 63 75 6d 65 6e 74 |his TSM |document|
|00003a30| 20 72 65 6c 61 74 65 73 | 20 74 6f 2e 0d 49 6e 20 | relates| to..In |
|00003a40| 70 72 65 55 70 64 61 74 | 65 50 72 6f 63 20 61 6e |preUpdat|eProc an|
|00003a50| 64 20 70 6f 73 74 55 70 | 64 61 74 65 50 72 6f 63 |d postUp|dateProc|
|00003a60| 20 79 6f 75 20 63 61 6e | 20 73 70 65 63 69 66 79 | you can| specify|
|00003a70| 20 63 61 6c 6c 2d 62 61 | 63 6b 20 72 6f 75 74 69 | call-ba|ck routi|
|00003a80| 6e 65 73 20 74 68 61 74 | 20 54 53 4d 54 45 20 73 |nes that| TSMTE s|
|00003a90| 68 6f 75 6c 64 20 63 61 | 6c 6c 20 62 65 66 6f 72 |hould ca|ll befor|
|00003aa0| 65 20 61 6e 64 20 61 66 | 74 65 72 20 69 74 73 20 |e and af|ter its |
|00003ab0| 6f 77 6e 20 63 6f 64 65 | 20 77 68 65 6e 20 68 61 |own code| when ha|
|00003ac0| 6e 64 6c 69 6e 67 20 74 | 68 65 20 55 70 64 61 74 |ndling t|he Updat|
|00003ad0| 65 20 41 63 74 69 76 65 | 20 49 6e 70 75 74 20 41 |e Active| Input A|
|00003ae0| 72 65 61 20 65 76 65 6e | 74 20 28 6f 6e 65 20 6f |rea even|t (one o|
|00003af0| 66 20 74 68 65 20 41 70 | 70 6c 65 20 65 76 65 6e |f the Ap|ple even|
|00003b00| 74 73 20 74 68 61 74 20 | 69 73 20 73 65 6e 74 20 |ts that |is sent |
|00003b10| 62 79 20 74 68 65 20 69 | 6e 70 75 74 20 6d 65 74 |by the i|nput met|
|00003b20| 68 6f 64 29 2e 20 54 68 | 65 20 69 6e 74 65 72 66 |hod). Th|e interf|
|00003b30| 61 63 65 73 20 61 6e 64 | 20 70 6f 73 73 69 62 6c |aces and| possibl|
|00003b40| 65 20 75 73 65 73 20 66 | 6f 72 20 62 6f 74 68 20 |e uses f|or both |
|00003b50| 72 6f 75 74 69 6e 65 73 | 20 61 72 65 20 64 65 73 |routines| are des|
|00003b60| 63 72 69 62 65 64 20 62 | 65 6c 6f 77 2e 20 49 66 |cribed b|elow. If|
|00003b70| 20 79 6f 75 20 64 6f 6e | d5 74 20 68 61 76 65 20 | you don|.t have |
|00003b80| 72 6f 75 74 69 6e 65 73 | 20 74 68 61 74 20 54 53 |routines| that TS|
|00003b90| 4d 54 45 20 73 68 6f 75 | 6c 64 20 63 61 6c 6c 2c |MTE shou|ld call,|
|00003ba0| 20 73 65 74 20 74 68 65 | 20 66 69 65 6c 64 73 20 | set the| fields |
|00003bb0| 74 6f 20 6e 69 6c 2e 0d | 54 68 65 20 75 70 64 61 |to nil..|The upda|
|00003bc0| 74 65 46 6c 61 67 20 66 | 69 65 6c 64 20 69 73 20 |teFlag f|ield is |
|00003bd0| 69 6e 74 65 6e 64 65 64 | 20 66 6f 72 20 63 75 73 |intended| for cus|
|00003be0| 74 6f 6d 69 7a 61 74 69 | 6f 6e 20 6f 66 20 54 53 |tomizati|on of TS|
|00003bf0| 4d 54 45 d5 73 20 62 65 | 68 61 76 69 6f 72 2e 20 |MTE.s be|havior. |
|00003c00| 54 68 65 20 69 64 65 61 | 20 69 73 20 74 68 61 74 |The idea| is that|
|00003c10| 20 54 53 4d 54 45 20 63 | 61 6e 20 64 65 66 69 6e | TSMTE c|an defin|
|00003c20| 65 20 73 65 76 65 72 61 | 6c 20 63 6f 6e 73 74 61 |e severa|l consta|
|00003c30| 6e 74 73 20 66 6f 72 20 | 76 61 72 69 61 74 69 6f |nts for |variatio|
|00003c40| 6e 73 20 69 6e 20 69 74 | 73 20 62 65 68 61 76 69 |ns in it|s behavi|
|00003c50| 6f 72 73 2c 20 61 6e 64 | 20 79 6f 75 20 73 75 6d |ors, and| you sum|
|00003c60| 20 75 70 20 74 68 65 20 | 63 6f 6e 73 74 61 6e 74 | up the |constant|
|00003c70| 73 20 66 6f 72 20 74 68 | 65 20 76 61 72 69 61 74 |s for th|e variat|
|00003c80| 69 6f 6e 73 20 74 68 61 | 74 20 79 6f 75 20 6c 69 |ions tha|t you li|
|00003c90| 6b 65 20 61 6e 64 20 61 | 73 73 69 67 6e 20 74 68 |ke and a|ssign th|
|00003ca0| 65 6d 20 74 6f 20 74 68 | 65 20 75 70 64 61 74 65 |em to th|e update|
|00003cb0| 46 6c 61 67 20 66 69 65 | 6c 64 2e 20 43 75 72 72 |Flag fie|ld. Curr|
|00003cc0| 65 6e 74 6c 79 2c 20 6f | 6e 6c 79 20 6f 6e 65 20 |ently, o|nly one |
|00003cd0| 73 75 63 68 20 63 6f 6e | 73 74 61 6e 74 2c 20 6b |such con|stant, k|
|00003ce0| 54 53 4d 54 45 41 75 74 | 6f 53 63 72 6f 6c 6c 2c |TSMTEAut|oScroll,|
|00003cf0| 20 69 73 20 64 65 66 69 | 6e 65 64 2e 20 49 74 20 | is defi|ned. It |
|00003d00| 73 70 65 63 69 66 69 65 | 73 20 74 68 61 74 20 54 |specifie|s that T|
|00003d10| 53 4d 54 45 20 61 75 74 | 6f 6d 61 74 69 63 61 6c |SMTE aut|omatical|
|00003d20| 6c 79 20 73 63 72 6f 6c | 6c 73 20 74 68 65 20 73 |ly scrol|ls the s|
|00003d30| 65 6c 65 63 74 69 6f 6e | 20 72 61 6e 67 65 20 69 |election| range i|
|00003d40| 6e 74 6f 20 76 69 65 77 | 2e 20 49 66 20 79 6f 75 |nto view|. If you|
|00003d50| 20 73 65 74 20 75 70 64 | 61 74 65 46 6c 61 67 20 | set upd|ateFlag |
|00003d60| 74 6f 20 30 2c 20 61 75 | 74 6f 6d 61 74 69 63 20 |to 0, au|tomatic |
|00003d70| 73 63 72 6f 6c 6c 69 6e | 67 20 69 73 20 64 69 73 |scrollin|g is dis|
|00003d80| 61 62 6c 65 64 2c 20 61 | 6e 64 20 79 6f 75 20 68 |abled, a|nd you h|
|00003d90| 61 76 65 20 74 6f 20 73 | 63 72 6f 6c 6c 20 74 68 |ave to s|croll th|
|00003da0| 65 20 74 65 78 74 20 79 | 6f 75 72 73 65 6c 66 2c |e text y|ourself,|
|00003db0| 20 65 2e 67 2e 2c 20 69 | 6e 20 6f 6e 65 20 6f 66 | e.g., i|n one of|
|00003dc0| 20 74 68 65 20 63 61 6c | 6c 2d 62 61 63 6b 20 72 | the cal|l-back r|
|00003dd0| 6f 75 74 69 6e 65 73 2e | 0d 54 68 65 20 72 65 66 |outines.|.The ref|
|00003de0| 43 6f 6e 20 66 69 65 6c | 64 20 6c 65 74 73 20 79 |Con fiel|d lets y|
|00003df0| 6f 75 20 73 70 65 63 69 | 66 79 20 61 20 76 61 6c |ou speci|fy a val|
|00003e00| 75 65 20 74 68 61 74 20 | 54 53 4d 54 45 20 77 69 |ue that |TSMTE wi|
|00003e10| 6c 6c 20 70 61 73 73 20 | 6f 6e 20 74 6f 20 74 68 |ll pass |on to th|
|00003e20| 65 20 63 61 6c 6c 2d 62 | 61 63 6b 20 72 6f 75 74 |e call-b|ack rout|
|00003e30| 69 6e 65 73 2e 20 54 53 | 4d 54 45 20 64 6f 65 73 |ines. TS|MTE does|
|00003e40| 6e d5 74 20 6d 61 6b 65 | 20 61 6e 79 20 6f 74 68 |n.t make| any oth|
|00003e50| 65 72 20 75 73 65 20 6f | 66 20 74 68 69 73 20 66 |er use o|f this f|
|00003e60| 69 65 6c 64 2e 0d 48 65 | 72 65 20 69 73 20 73 6f |ield..He|re is so|
|00003e70| 6d 65 20 73 61 6d 70 6c | 65 20 63 6f 64 65 20 66 |me sampl|e code f|
|00003e80| 6f 72 20 63 72 65 61 74 | 69 6e 67 20 61 20 54 53 |or creat|ing a TS|
|00003e90| 4d 44 6f 63 75 6d 65 6e | 74 2e 20 49 74 20 61 73 |MDocumen|t. It as|
|00003ea0| 73 75 6d 65 73 20 74 68 | 61 74 20 79 6f 75 20 68 |sumes th|at you h|
|00003eb0| 61 76 65 20 6a 75 73 74 | 20 63 72 65 61 74 65 64 |ave just| created|
|00003ec0| 20 61 20 54 45 48 61 6e | 64 6c 65 20 63 61 6c 6c | a TEHan|dle call|
|00003ed0| 65 64 20 64 6f 63 54 45 | 48 61 6e 64 6c 65 2c 20 |ed docTE|Handle, |
|00003ee0| 61 6e 64 20 74 68 61 74 | 20 61 20 42 6f 6f 6c 65 |and that| a Boole|
|00003ef0| 61 6e 20 76 61 72 69 61 | 62 6c 65 20 67 6f 6f 64 |an varia|ble good|
|00003f00| 20 69 73 20 75 73 65 64 | 20 74 6f 20 69 6e 64 69 | is used| to indi|
|00003f10| 63 61 74 65 20 77 68 65 | 74 68 65 72 20 6f 70 65 |cate whe|ther ope|
|00003f20| 72 61 74 69 6f 6e 73 20 | 61 72 65 20 73 75 63 63 |rations |are succ|
|00003f30| 65 73 73 66 75 6c 2c 20 | 61 6e 64 20 74 68 61 74 |essful, |and that|
|00003f40| 20 79 6f 75 20 77 61 6e | 74 20 74 6f 20 70 61 73 | you wan|t to pas|
|00003f50| 73 20 61 20 70 6f 69 6e | 74 65 72 20 74 6f 20 74 |s a poin|ter to t|
|00003f60| 68 65 20 64 6f 63 75 6d | 65 6e 74 20 77 69 6e 64 |he docum|ent wind|
|00003f70| 6f 77 20 74 6f 20 79 6f | 75 72 20 63 61 6c 6c 2d |ow to yo|ur call-|
|00003f80| 62 61 63 6b 20 72 6f 75 | 74 69 6e 65 2e 0d 69 66 |back rou|tine..if|
|00003f90| 20 28 67 6f 6f 64 20 26 | 26 20 67 48 61 73 54 53 | (good &|& gHasTS|
|00003fa0| 4d 54 45 29 0d 7b 0d 09 | 73 75 70 70 6f 72 74 65 |MTE).{..|supporte|
|00003fb0| 64 49 6e 74 65 72 66 61 | 63 65 73 5b 30 5d 20 3d |dInterfa|ces[0] =|
|00003fc0| 20 6b 54 53 4d 54 45 49 | 6e 74 65 72 66 61 63 65 | kTSMTEI|nterface|
|00003fd0| 54 79 70 65 3b 0d 09 69 | 66 20 28 4e 65 77 54 53 |Type;..i|f (NewTS|
|00003fe0| 4d 44 6f 63 75 6d 65 6e | 74 28 31 2c 20 73 75 70 |MDocumen|t(1, sup|
|00003ff0| 70 6f 72 74 65 64 49 6e | 74 65 72 66 61 63 65 73 |portedIn|terfaces|
|00004000| 2c 20 26 64 6f 63 2d 3e | 64 6f 63 54 53 4d 44 6f |, &doc->|docTSMDo|
|00004010| 63 2c 0d 09 09 09 09 28 | 6c 6f 6e 67 29 20 26 64 |c,.....(|long) &d|
|00004020| 6f 63 2d 3e 64 6f 63 54 | 53 4d 54 45 52 65 63 48 |oc->docT|SMTERecH|
|00004030| 61 6e 64 6c 65 29 20 3d | 3d 20 6e 6f 45 72 72 29 |andle) =|= noErr)|
|00004040| 0d 09 7b 0d 09 09 54 53 | 4d 54 45 52 65 63 50 74 |..{...TS|MTERecPt|
|00004050| 72 20 74 73 6d 74 65 52 | 65 63 50 74 72 20 3d 20 |r tsmteR|ecPtr = |
|00004060| 2a 28 64 6f 63 2d 3e 64 | 6f 63 54 53 4d 54 45 52 |*(doc->d|ocTSMTER|
|00004070| 65 63 48 61 6e 64 6c 65 | 29 3b 0d 09 09 0d 09 09 |ecHandle|);......|
|00004080| 74 73 6d 74 65 52 65 63 | 50 74 72 2d 3e 74 65 78 |tsmteRec|Ptr->tex|
|00004090| 74 48 20 3d 20 64 6f 63 | 2d 3e 64 6f 63 54 45 3b |tH = doc|->docTE;|
|000040a0| 0d 09 09 74 73 6d 74 65 | 52 65 63 50 74 72 2d 3e |...tsmte|RecPtr->|
|000040b0| 70 72 65 55 70 64 61 74 | 65 50 72 6f 63 20 3d 20 |preUpdat|eProc = |
|000040c0| 67 54 53 4d 54 45 50 72 | 65 55 70 64 61 74 65 55 |gTSMTEPr|eUpdateU|
|000040d0| 50 50 3b 0d 09 09 74 73 | 6d 74 65 52 65 63 50 74 |PP;...ts|mteRecPt|
|000040e0| 72 2d 3e 70 6f 73 74 55 | 70 64 61 74 65 50 72 6f |r->postU|pdatePro|
|000040f0| 63 20 3d 20 67 54 53 4d | 54 45 50 6f 73 74 55 70 |c = gTSM|TEPostUp|
|00004100| 64 61 74 65 55 50 50 3b | 0d 09 09 74 73 6d 74 65 |dateUPP;|...tsmte|
|00004110| 52 65 63 50 74 72 2d 3e | 75 70 64 61 74 65 46 6c |RecPtr->|updateFl|
|00004120| 61 67 20 3d 20 6b 54 53 | 4d 54 45 41 75 74 6f 53 |ag = kTS|MTEAutoS|
|00004130| 63 72 6f 6c 6c 3b 0d 09 | 09 74 73 6d 74 65 52 65 |croll;..|.tsmteRe|
|00004140| 63 50 74 72 2d 3e 72 65 | 66 43 6f 6e 20 3d 20 28 |cPtr->re|fCon = (|
|00004150| 6c 6f 6e 67 29 20 77 69 | 6e 64 6f 77 3b 0d 09 7d |long) wi|ndow;..}|
|00004160| 0d 09 65 6c 73 65 0d 09 | 09 67 6f 6f 64 20 3d 20 |..else..|.good = |
|00004170| 66 61 6c 73 65 3b 0d 7d | 3b 0d 59 6f 75 20 73 68 |false;.}|;.You sh|
|00004180| 6f 75 6c 64 6e d5 74 20 | 64 69 73 70 6f 73 65 20 |ouldn.t |dispose |
|00004190| 6f 66 20 74 68 65 20 54 | 53 4d 54 45 52 65 63 48 |of the T|SMTERecH|
|000041a0| 61 6e 64 6c 65 20 d0 20 | 44 65 6c 65 74 65 54 53 |andle . |DeleteTS|
|000041b0| 4d 44 6f 63 75 6d 65 6e | 74 20 77 69 6c 6c 20 64 |MDocumen|t will d|
|000041c0| 6f 20 74 68 69 73 20 66 | 6f 72 20 79 6f 75 2e 0d |o this f|or you..|
|000041d0| 55 73 69 6e 67 20 61 20 | 50 72 65 2d 55 70 64 61 |Using a |Pre-Upda|
|000041e0| 74 65 20 43 61 6c 6c 2d | 42 61 63 6b 20 52 6f 75 |te Call-|Back Rou|
|000041f0| 74 69 6e 65 0d 50 72 65 | 2d 75 70 64 61 74 65 20 |tine.Pre|-update |
|00004200| 63 61 6c 6c 2d 62 61 63 | 6b 20 72 6f 75 74 69 6e |call-bac|k routin|
|00004210| 65 73 20 66 6f 72 20 54 | 53 4d 54 45 20 68 61 76 |es for T|SMTE hav|
|00004220| 65 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |e the fo|llowing |
|00004230| 69 6e 74 65 72 66 61 63 | 65 3a 0d 70 61 73 63 61 |interfac|e:.pasca|
|00004240| 6c 20 76 6f 69 64 20 4d | 79 54 53 4d 54 45 50 72 |l void M|yTSMTEPr|
|00004250| 65 55 70 64 61 74 65 50 | 72 6f 63 28 54 45 48 61 |eUpdateP|roc(TEHa|
|00004260| 6e 64 6c 65 20 74 65 78 | 74 48 2c 20 6c 6f 6e 67 |ndle tex|tH, long|
|00004270| 20 72 65 66 43 6f 6e 29 | 3b 0d 49 66 20 79 6f 75 | refCon)|;.If you|
|00004280| 20 70 72 6f 76 69 64 65 | 20 61 20 70 72 65 2d 75 | provide| a pre-u|
|00004290| 70 64 61 74 65 20 72 6f | 75 74 69 6e 65 20 66 6f |pdate ro|utine fo|
|000042a0| 72 20 61 20 54 53 4d 20 | 64 6f 63 75 6d 65 6e 74 |r a TSM |document|
|000042b0| 2c 20 69 74 20 69 73 20 | 63 61 6c 6c 65 64 20 62 |, it is |called b|
|000042c0| 65 66 6f 72 65 20 54 53 | 4d 54 45 d5 73 20 63 6f |efore TS|MTE.s co|
|000042d0| 64 65 20 66 6f 72 20 68 | 61 6e 64 6c 69 6e 67 20 |de for h|andling |
|000042e0| 74 68 65 20 55 70 64 61 | 74 65 20 41 63 74 69 76 |the Upda|te Activ|
|000042f0| 65 20 49 6e 70 75 74 20 | 41 72 65 61 20 65 76 65 |e Input |Area eve|
|00004300| 6e 74 73 20 72 65 6c 61 | 74 69 6e 67 20 74 6f 20 |nts rela|ting to |
|00004310| 74 68 69 73 20 64 6f 63 | 75 6d 65 6e 74 2e 0d 54 |this doc|ument..T|
|00004320| 68 65 20 76 61 6c 75 65 | 73 20 66 6f 72 20 74 68 |he value|s for th|
|00004330| 65 20 74 65 78 74 48 20 | 61 6e 64 20 72 65 66 43 |e textH |and refC|
|00004340| 6f 6e 20 61 72 67 75 6d | 65 6e 74 73 20 61 72 65 |on argum|ents are|
|00004350| 20 74 61 6b 65 6e 20 66 | 72 6f 6d 20 74 68 65 20 | taken f|rom the |
|00004360| 54 53 4d 54 45 52 65 63 | 48 61 6e 64 6c 65 20 6f |TSMTERec|Handle o|
|00004370| 66 20 74 68 65 20 54 53 | 4d 20 64 6f 63 75 6d 65 |f the TS|M docume|
|00004380| 6e 74 2e 0d 4f 6e 65 20 | 63 6f 6d 6d 6f 6e 20 75 |nt..One |common u|
|00004390| 73 65 20 6f 66 20 74 68 | 65 20 70 72 65 2d 75 70 |se of th|e pre-up|
|000043a0| 64 61 74 65 20 72 6f 75 | 74 69 6e 65 20 69 73 20 |date rou|tine is |
|000043b0| 74 6f 20 73 61 76 65 20 | 69 6e 66 6f 72 6d 61 74 |to save |informat|
|000043c0| 69 6f 6e 20 74 68 61 74 | 20 77 69 6c 6c 20 62 65 |ion that| will be|
|000043d0| 20 6e 65 65 64 65 64 20 | 66 6f 72 20 55 6e 64 6f | needed |for Undo|
|000043e0| 20 61 6e 64 20 52 65 64 | 6f 2e 20 57 69 74 68 6f | and Red|o. Witho|
|000043f0| 75 74 20 69 6e 6c 69 6e | 65 20 69 6e 70 75 74 2c |ut inlin|e input,|
|00004400| 20 61 6e 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 | an appl|ication |
|00004410| 74 79 70 69 63 61 6c 6c | 79 20 74 72 65 61 74 73 |typicall|y treats|
|00004420| 20 61 6e 20 75 6e 69 6e | 74 65 72 72 75 70 74 65 | an unin|terrupte|
|00004430| 64 20 73 65 71 75 65 6e | 63 65 20 6f 66 20 6b 65 |d sequen|ce of ke|
|00004440| 79 44 6f 77 6e 20 65 76 | 65 6e 74 73 20 28 6f 74 |yDown ev|ents (ot|
|00004450| 68 65 72 20 74 68 61 6e | 20 61 72 72 6f 77 20 6f |her than| arrow o|
|00004460| 72 20 66 75 6e 63 74 69 | 6f 6e 20 6b 65 79 73 29 |r functi|on keys)|
|00004470| 20 61 73 20 6f 6e 65 20 | 61 63 74 69 6f 6e 2c 20 | as one |action, |
|00004480| 61 6e 64 20 73 61 76 65 | 73 20 74 68 65 20 63 75 |and save|s the cu|
|00004490| 72 72 65 6e 74 6c 79 20 | 73 65 6c 65 63 74 65 64 |rrently |selected|
|000044a0| 20 74 65 78 74 20 61 6e | 64 20 72 65 6c 61 74 65 | text an|d relate|
|000044b0| 64 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 77 68 |d inform|ation wh|
|000044c0| 65 6e 20 72 65 63 65 69 | 76 69 6e 67 20 74 68 65 |en recei|ving the|
|000044d0| 20 66 69 72 73 74 20 65 | 76 65 6e 74 20 69 6e 20 | first e|vent in |
|000044e0| 74 68 69 73 20 73 65 71 | 75 65 6e 63 65 2e 20 49 |this seq|uence. I|
|000044f0| 6e 20 74 68 69 73 20 72 | 65 67 61 72 64 2c 20 79 |n this r|egard, y|
|00004500| 6f 75 20 73 68 6f 75 6c | 64 20 74 72 65 61 74 20 |ou shoul|d treat |
|00004510| 61 20 63 61 6c 6c 20 74 | 6f 20 79 6f 75 72 20 70 |a call t|o your p|
|00004520| 72 65 2d 75 70 64 61 74 | 65 20 72 6f 75 74 69 6e |re-updat|e routin|
|00004530| 65 20 61 73 20 6a 75 73 | 74 20 61 6e 6f 74 68 65 |e as jus|t anothe|
|00004540| 72 20 66 6f 72 6d 20 6f | 66 20 74 79 70 69 6e 67 |r form o|f typing|
|00004550| 2c 20 61 6e 64 20 69 66 | 20 69 74 d5 73 20 74 68 |, and if| it.s th|
|00004560| 65 20 66 69 72 73 74 20 | 6f 6e 65 20 69 6e 20 61 |e first |one in a|
|00004570| 20 74 79 70 69 6e 67 20 | 73 65 71 75 65 6e 63 65 | typing |sequence|
|00004580| 2c 20 73 61 76 65 20 74 | 68 65 20 69 6e 66 6f 72 |, save t|he infor|
|00004590| 6d 61 74 69 6f 6e 20 66 | 6f 72 20 55 6e 64 6f 2e |mation f|or Undo.|
|000045a0| 0d 41 6e 6f 74 68 65 72 | 20 75 73 65 20 69 73 20 |.Another| use is |
|000045b0| 74 6f 20 77 6f 72 6b 20 | 61 72 6f 75 6e 64 20 61 |to work |around a|
|000045c0| 20 62 75 67 20 69 6e 20 | 54 53 4d 54 45 20 31 2e | bug in |TSMTE 1.|
|000045d0| 30 2c 20 77 68 69 63 68 | 20 64 6f 65 73 6e d5 74 |0, which| doesn.t|
|000045e0| 20 61 6c 77 61 79 73 20 | 73 79 6e 63 68 72 6f 6e | always |synchron|
|000045f0| 69 7a 65 20 74 68 65 20 | 66 6f 6e 74 20 74 6f 20 |ize the |font to |
|00004600| 62 65 20 75 73 65 64 20 | 77 69 74 68 20 74 68 65 |be used |with the|
|00004610| 20 63 75 72 72 65 6e 74 | 20 6b 65 79 62 6f 61 72 | current| keyboar|
|00004620| 64 20 73 63 72 69 70 74 | 2e 20 54 68 65 20 66 6f |d script|. The fo|
|00004630| 6c 6c 6f 77 69 6e 67 20 | 72 6f 75 74 69 6e 65 20 |llowing |routine |
|00004640| 63 68 65 63 6b 73 20 77 | 68 65 74 68 65 72 20 74 |checks w|hether t|
|00004650| 68 65 20 63 75 72 72 65 | 6e 74 20 66 6f 6e 74 20 |he curre|nt font |
|00004660| 63 61 6e 20 64 69 73 70 | 6c 61 79 20 74 68 65 20 |can disp|lay the |
|00004670| 69 6e 63 6f 6d 69 6e 67 | 20 63 68 61 72 61 63 74 |incoming| charact|
|00004680| 65 72 73 2c 20 61 6e 64 | 20 69 66 20 6e 6f 74 2c |ers, and| if not,|
|00004690| 20 73 65 74 73 20 74 68 | 65 20 66 6f 6e 74 20 74 | sets th|e font t|
|000046a0| 6f 20 74 68 65 20 6b 65 | 79 62 6f 61 72 64 20 73 |o the ke|yboard s|
|000046b0| 63 72 69 70 74 d5 73 20 | 61 70 70 6c 69 63 61 74 |cript.s |applicat|
|000046c0| 69 6f 6e 20 66 6f 6e 74 | 2e 20 41 20 62 65 74 74 |ion font|. A bett|
|000046d0| 65 72 20 73 6f 6c 75 74 | 69 6f 6e 20 77 6f 75 6c |er solut|ion woul|
|000046e0| 64 20 62 65 20 74 6f 20 | 73 63 61 6e 20 74 68 65 |d be to |scan the|
|000046f0| 20 74 65 78 74 20 62 61 | 63 6b 77 61 72 64 73 20 | text ba|ckwards |
|00004700| 66 6f 72 20 74 68 65 20 | 6d 6f 73 74 20 72 65 63 |for the |most rec|
|00004710| 65 6e 74 6c 79 20 75 73 | 65 64 20 66 6f 6e 74 20 |ently us|ed font |
|00004720| 6f 66 20 74 68 65 20 6b | 65 79 62 6f 61 72 64 20 |of the k|eyboard |
|00004730| 73 63 72 69 70 74 2e 20 | 54 68 69 73 20 73 6f 6c |script. |This sol|
|00004740| 75 74 69 6f 6e 20 77 69 | 6c 6c 20 62 65 20 75 73 |ution wi|ll be us|
|00004750| 65 64 20 62 79 20 66 75 | 74 75 72 65 20 76 65 72 |ed by fu|ture ver|
|00004760| 73 69 6f 6e 73 20 6f 66 | 20 54 53 4d 54 45 2c 20 |sions of| TSMTE, |
|00004770| 73 6f 20 6d 61 6b 65 20 | 73 75 72 65 20 74 6f 20 |so make |sure to |
|00004780| 63 68 65 63 6b 20 74 68 | 65 20 54 53 4d 54 45 20 |check th|e TSMTE |
|00004790| 76 65 72 73 69 6f 6e 20 | 61 6e 64 20 75 73 65 20 |version |and use |
|000047a0| 74 68 65 20 77 6f 72 6b | 61 72 6f 75 6e 64 20 6f |the work|around o|
|000047b0| 6e 6c 79 20 66 6f 72 20 | 54 53 4d 54 45 20 31 2e |nly for |TSMTE 1.|
|000047c0| 30 2c 20 61 73 20 73 68 | 6f 77 6e 20 62 65 6c 6f |0, as sh|own belo|
|000047d0| 77 2e 20 54 68 65 20 73 | 79 6e 63 68 72 6f 6e 69 |w. The s|ynchroni|
|000047e0| 7a 61 74 69 6f 6e 20 69 | 73 20 6f 6e 6c 79 20 6e |zation i|s only n|
|000047f0| 65 63 65 73 73 61 72 79 | 20 77 68 65 6e 20 61 20 |ecessary| when a |
|00004800| 6e 65 77 20 61 63 74 69 | 76 65 20 69 6e 70 75 74 |new acti|ve input|
|00004810| 20 61 72 65 61 20 69 73 | 20 63 72 65 61 74 65 64 | area is| created|
|00004820| 2c 20 73 6f 20 79 6f 75 | 20 6d 61 79 20 77 61 6e |, so you| may wan|
|00004830| 74 20 74 6f 20 75 73 65 | 20 74 68 65 20 70 6f 73 |t to use| the pos|
|00004840| 74 2d 75 70 64 61 74 65 | 20 72 6f 75 74 69 6e 65 |t-update| routine|
|00004850| 20 74 6f 20 74 72 61 63 | 6b 20 77 68 65 74 68 65 | to trac|k whethe|
|00004860| 72 20 74 68 65 72 65 20 | 69 73 20 61 6e 20 61 63 |r there |is an ac|
|00004870| 74 69 76 65 20 69 6e 70 | 75 74 20 61 72 65 61 20 |tive inp|ut area |
|00004880| 61 6e 64 20 6f 6e 6c 79 | 20 65 78 65 63 75 74 65 |and only| execute|
|00004890| 20 74 68 65 20 66 6f 6e | 74 20 73 79 6e 63 68 72 | the fon|t synchr|
|000048a0| 6f 6e 69 7a 61 74 69 6f | 6e 20 63 6f 64 65 20 77 |onizatio|n code w|
|000048b0| 68 65 6e 20 74 68 65 20 | 70 72 65 2d 75 70 64 61 |hen the |pre-upda|
|000048c0| 74 65 20 72 6f 75 74 69 | 6e 65 20 69 73 20 63 61 |te routi|ne is ca|
|000048d0| 6c 6c 65 64 20 77 68 69 | 6c 65 20 74 68 65 72 65 |lled whi|le there|
|000048e0| d5 73 20 6e 6f 20 61 63 | 74 69 76 65 20 69 6e 70 |.s no ac|tive inp|
|000048f0| 75 74 20 61 72 65 61 2e | 0d 73 74 61 74 69 63 20 |ut area.|.static |
|00004900| 70 61 73 63 61 6c 20 76 | 6f 69 64 20 4d 79 54 53 |pascal v|oid MyTS|
|00004910| 4d 54 45 50 72 65 55 70 | 64 61 74 65 50 72 6f 63 |MTEPreUp|dateProc|
|00004920| 28 54 45 48 61 6e 64 6c | 65 20 74 65 78 74 48 2c |(TEHandl|e textH,|
|00004930| 20 6c 6f 6e 67 20 72 65 | 66 43 6f 6e 29 0d 7b 0d | long re|fCon).{.|
|00004940| 09 6c 6f 6e 67 20 72 65 | 73 70 6f 6e 73 65 3b 0d |.long re|sponse;.|
|00004950| 09 53 63 72 69 70 74 43 | 6f 64 65 20 6b 65 79 62 |.ScriptC|ode keyb|
|00004960| 6f 61 72 64 53 63 72 69 | 70 74 3b 0d 09 73 68 6f |oardScri|pt;..sho|
|00004970| 72 74 20 6d 6f 64 65 3b | 0d 09 54 65 78 74 53 74 |rt mode;|..TextSt|
|00004980| 79 6c 65 20 74 68 65 53 | 74 79 6c 65 3b 0d 09 0d |yle theS|tyle;...|
|00004990| 09 69 66 20 28 28 47 65 | 73 74 61 6c 74 28 67 65 |.if ((Ge|stalt(ge|
|000049a0| 73 74 61 6c 74 54 53 4d | 54 45 56 65 72 73 69 6f |staltTSM|TEVersio|
|000049b0| 6e 2c 20 26 72 65 73 70 | 6f 6e 73 65 29 20 3d 3d |n, &resp|onse) ==|
|000049c0| 20 6e 6f 45 72 72 29 20 | 26 26 0d 09 09 20 28 72 | noErr) |&&... (r|
|000049d0| 65 73 70 6f 6e 73 65 20 | 3d 3d 20 67 65 73 74 61 |esponse |== gesta|
|000049e0| 6c 74 54 53 4d 54 45 31 | 29 29 0d 09 7b 0d 09 09 |ltTSMTE1|))..{...|
|000049f0| 6b 65 79 62 6f 61 72 64 | 53 63 72 69 70 74 20 3d |keyboard|Script =|
|00004a00| 20 47 65 74 53 63 72 69 | 70 74 4d 61 6e 61 67 65 | GetScri|ptManage|
|00004a10| 72 56 61 72 69 61 62 6c | 65 28 73 6d 4b 65 79 53 |rVariabl|e(smKeyS|
|00004a20| 63 72 69 70 74 29 3b 0d | 09 09 6d 6f 64 65 20 3d |cript);.|..mode =|
|00004a30| 20 64 6f 46 6f 6e 74 3b | 0d 09 09 69 66 20 28 21 | doFont;|...if (!|
|00004a40| 28 54 45 43 6f 6e 74 69 | 6e 75 6f 75 73 53 74 79 |(TEConti|nuousSty|
|00004a50| 6c 65 28 26 6d 6f 64 65 | 2c 20 26 74 68 65 53 74 |le(&mode|, &theSt|
|00004a60| 79 6c 65 2c 20 74 65 78 | 74 48 29 20 26 26 0d 09 |yle, tex|tH) &&..|
|00004a70| 09 09 09 46 6f 6e 74 54 | 6f 53 63 72 69 70 74 28 |...FontT|oScript(|
|00004a80| 74 68 65 53 74 79 6c 65 | 2e 74 73 46 6f 6e 74 29 |theStyle|.tsFont)|
|00004a90| 20 3d 3d 20 6b 65 79 62 | 6f 61 72 64 53 63 72 69 | == keyb|oardScri|
|00004aa0| 70 74 29 29 0d 09 09 7b | 0d 09 09 09 74 68 65 53 |pt))...{|....theS|
|00004ab0| 74 79 6c 65 2e 74 73 46 | 6f 6e 74 20 3d 20 47 65 |tyle.tsF|ont = Ge|
|00004ac0| 74 53 63 72 69 70 74 56 | 61 72 69 61 62 6c 65 28 |tScriptV|ariable(|
|00004ad0| 6b 65 79 62 6f 61 72 64 | 53 63 72 69 70 74 2c 20 |keyboard|Script, |
|00004ae0| 73 6d 53 63 72 69 70 74 | 41 70 70 46 6f 6e 64 29 |smScript|AppFond)|
|00004af0| 3b 0d 09 09 09 54 45 53 | 65 74 53 74 79 6c 65 28 |;....TES|etStyle(|
|00004b00| 64 6f 46 6f 6e 74 2c 20 | 26 74 68 65 53 74 79 6c |doFont, |&theStyl|
|00004b10| 65 2c 20 66 61 6c 73 65 | 2c 20 74 65 78 74 48 29 |e, false|, textH)|
|00004b20| 3b 0d 09 09 7d 3b 0d 09 | 7d 3b 0d 7d 0d 4e 6f 74 |;...};..|};.}.Not|
|00004b30| 65 3a 09 44 65 70 65 6e | 64 69 6e 67 20 6f 6e 20 |e:.Depen|ding on |
|00004b40| 77 68 69 63 68 20 69 6e | 74 65 72 66 61 63 65 20 |which in|terface |
|00004b50| 66 69 6c 65 73 20 79 6f | 75 20 75 73 65 2c 20 79 |files yo|u use, y|
|00004b60| 6f 75 20 6d 61 79 20 68 | 61 76 65 20 74 6f 20 75 |ou may h|ave to u|
|00004b70| 73 65 20 74 68 65 20 6f | 6c 64 20 6e 61 6d 65 20 |se the o|ld name |
|00004b80| 47 65 74 45 6e 76 69 72 | 6f 6e 73 20 69 6e 73 74 |GetEnvir|ons inst|
|00004b90| 65 61 64 20 6f 66 20 74 | 68 65 20 6e 65 77 20 47 |ead of t|he new G|
|00004ba0| 65 74 53 63 72 69 70 74 | 4d 61 6e 61 67 65 72 56 |etScript|ManagerV|
|00004bb0| 61 72 69 61 62 6c 65 2c | 20 62 65 63 61 75 73 65 |ariable,| because|
|00004bc0| 20 74 68 65 72 65 d5 73 | 20 6e 6f 20 63 6f 72 72 | there.s| no corr|
|00004bd0| 65 63 74 20 64 65 63 6c | 61 72 61 74 69 6f 6e 20 |ect decl|aration |
|00004be0| 66 6f 72 20 74 68 65 20 | 6e 65 77 20 6e 61 6d 65 |for the |new name|
|00004bf0| 2e 20 54 68 65 20 75 6e | 69 76 65 72 73 61 6c 20 |. The un|iversal |
|00004c00| 69 6e 74 65 72 66 61 63 | 65 73 20 68 61 76 65 20 |interfac|es have |
|00004c10| 61 20 63 6f 72 72 65 63 | 74 20 64 65 63 6c 61 72 |a correc|t declar|
|00004c20| 61 74 69 6f 6e 2e 0d 49 | 66 20 79 6f 75 72 20 61 |ation..I|f your a|
|00004c30| 70 70 6c 69 63 61 74 69 | 6f 6e 20 6f 63 63 61 73 |pplicati|on occas|
|00004c40| 69 6f 6e 61 6c 6c 79 20 | 63 68 61 6e 67 65 73 20 |ionally |changes |
|00004c50| 74 68 65 20 6f 72 69 67 | 69 6e 20 6f 66 20 74 68 |the orig|in of th|
|00004c60| 65 20 54 65 78 74 45 64 | 69 74 20 72 65 63 6f 72 |e TextEd|it recor|
|00004c70| 64 d5 73 20 67 72 61 66 | 50 6f 72 74 2c 20 79 6f |d.s graf|Port, yo|
|00004c80| 75 20 63 61 6e 20 61 6c | 73 6f 20 75 73 65 20 74 |u can al|so use t|
|00004c90| 68 65 20 70 72 65 2d 75 | 70 64 61 74 65 20 72 6f |he pre-u|pdate ro|
|00004ca0| 75 74 69 6e 65 20 74 6f | 20 72 65 73 65 74 20 74 |utine to| reset t|
|00004cb0| 68 65 20 6f 72 69 67 69 | 6e 20 73 6f 20 74 68 61 |he origi|n so tha|
|00004cc0| 74 20 63 68 61 72 61 63 | 74 65 72 73 20 67 65 74 |t charac|ters get|
|00004cd0| 20 64 72 61 77 6e 20 69 | 6e 20 74 68 65 20 72 69 | drawn i|n the ri|
|00004ce0| 67 68 74 20 6c 6f 63 61 | 74 69 6f 6e 2e 0d 55 73 |ght loca|tion..Us|
|00004cf0| 69 6e 67 20 61 20 50 6f | 73 74 2d 55 70 64 61 74 |ing a Po|st-Updat|
|00004d00| 65 20 43 61 6c 6c 2d 42 | 61 63 6b 20 52 6f 75 74 |e Call-B|ack Rout|
|00004d10| 69 6e 65 0d 50 6f 73 74 | 2d 75 70 64 61 74 65 20 |ine.Post|-update |
|00004d20| 63 61 6c 6c 2d 62 61 63 | 6b 20 72 6f 75 74 69 6e |call-bac|k routin|
|00004d30| 65 73 20 66 6f 72 20 54 | 53 4d 54 45 20 68 61 76 |es for T|SMTE hav|
|00004d40| 65 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |e the fo|llowing |
|00004d50| 69 6e 74 65 72 66 61 63 | 65 3a 0d 70 61 73 63 61 |interfac|e:.pasca|
|00004d60| 6c 20 76 6f 69 64 20 4d | 79 54 53 4d 54 45 50 6f |l void M|yTSMTEPo|
|00004d70| 73 74 55 70 64 61 74 65 | 50 72 6f 63 28 54 45 48 |stUpdate|Proc(TEH|
|00004d80| 61 6e 64 6c 65 20 74 65 | 78 74 48 2c 20 6c 6f 6e |andle te|xtH, lon|
|00004d90| 67 20 66 69 78 4c 65 6e | 2c 0d 09 09 09 6c 6f 6e |g fixLen|,....lon|
|00004da0| 67 20 69 6e 70 75 74 41 | 72 65 61 53 74 61 72 74 |g inputA|reaStart|
|00004db0| 2c 20 6c 6f 6e 67 20 69 | 6e 70 75 74 41 72 65 61 |, long i|nputArea|
|00004dc0| 45 6e 64 2c 0d 09 09 09 | 6c 6f 6e 67 20 70 69 6e |End,....|long pin|
|00004dd0| 53 74 61 72 74 2c 20 6c | 6f 6e 67 20 70 69 6e 45 |Start, l|ong pinE|
|00004de0| 6e 64 2c 20 6c 6f 6e 67 | 20 72 65 66 43 6f 6e 29 |nd, long| refCon)|
|00004df0| 3b 0d 49 66 20 79 6f 75 | 20 70 72 6f 76 69 64 65 |;.If you| provide|
|00004e00| 20 61 20 70 6f 73 74 2d | 75 70 64 61 74 65 20 72 | a post-|update r|
|00004e10| 6f 75 74 69 6e 65 20 66 | 6f 72 20 61 20 54 53 4d |outine f|or a TSM|
|00004e20| 20 64 6f 63 75 6d 65 6e | 74 2c 20 69 74 20 69 73 | documen|t, it is|
|00004e30| 20 63 61 6c 6c 65 64 20 | 61 66 74 65 72 20 54 53 | called |after TS|
|00004e40| 4d 54 45 d5 73 20 63 6f | 64 65 20 66 6f 72 20 68 |MTE.s co|de for h|
|00004e50| 61 6e 64 6c 69 6e 67 20 | 55 70 64 61 74 65 20 41 |andling |Update A|
|00004e60| 63 74 69 76 65 20 49 6e | 70 75 74 20 41 72 65 61 |ctive In|put Area|
|00004e70| 20 65 76 65 6e 74 73 20 | 72 65 6c 61 74 69 6e 67 | events |relating|
|00004e80| 20 74 6f 20 74 68 69 73 | 20 64 6f 63 75 6d 65 6e | to this| documen|
|00004e90| 74 2e 20 49 66 20 79 6f | 75 20 68 61 76 65 20 73 |t. If yo|u have s|
|00004ea0| 65 74 20 74 68 65 20 75 | 70 64 61 74 65 46 6c 61 |et the u|pdateFla|
|00004eb0| 67 20 66 69 65 6c 64 20 | 69 6e 20 74 68 65 20 54 |g field |in the T|
|00004ec0| 53 4d 54 45 52 65 63 20 | 72 65 63 6f 72 64 20 74 |SMTERec |record t|
|00004ed0| 6f 20 6b 54 53 4d 54 45 | 41 75 74 6f 53 63 72 6f |o kTSMTE|AutoScro|
|00004ee0| 6c 6c 2c 20 54 53 4d 54 | 45 20 63 61 6c 6c 73 20 |ll, TSMT|E calls |
|00004ef0| 74 68 65 20 63 61 6c 6c | 2d 62 61 63 6b 20 72 6f |the call|-back ro|
|00004f00| 75 74 69 6e 65 20 66 69 | 72 73 74 2c 20 61 6e 64 |utine fi|rst, and|
|00004f10| 20 74 68 65 6e 20 73 63 | 72 6f 6c 6c 73 20 74 68 | then sc|rolls th|
|00004f20| 65 20 73 65 6c 65 63 74 | 69 6f 6e 20 72 61 6e 67 |e select|ion rang|
|00004f30| 65 20 69 6e 74 6f 20 76 | 69 65 77 2e 0d 54 68 65 |e into v|iew..The|
|00004f40| 20 76 61 6c 75 65 73 20 | 66 6f 72 20 74 68 65 20 | values |for the |
|00004f50| 74 65 78 74 48 20 61 6e | 64 20 72 65 66 43 6f 6e |textH an|d refCon|
|00004f60| 20 61 72 67 75 6d 65 6e | 74 73 20 61 72 65 20 74 | argumen|ts are t|
|00004f70| 61 6b 65 6e 20 66 72 6f | 6d 20 74 68 65 20 54 53 |aken fro|m the TS|
|00004f80| 4d 54 45 52 65 63 48 61 | 6e 64 6c 65 20 6f 66 20 |MTERecHa|ndle of |
|00004f90| 74 68 65 20 54 53 4d 20 | 64 6f 63 75 6d 65 6e 74 |the TSM |document|
|00004fa0| 2e 20 49 6e 70 75 74 41 | 72 65 61 53 74 61 72 74 |. InputA|reaStart|
|00004fb0| 20 61 6e 64 20 69 6e 70 | 75 74 41 72 65 61 45 6e | and inp|utAreaEn|
|00004fc0| 64 20 61 72 65 20 74 68 | 65 20 6f 66 66 73 65 74 |d are th|e offset|
|00004fd0| 73 20 6f 66 20 74 68 65 | 20 73 74 61 72 74 20 61 |s of the| start a|
|00004fe0| 6e 64 20 65 6e 64 20 6f | 66 20 74 68 65 20 61 63 |nd end o|f the ac|
|00004ff0| 74 69 76 65 20 69 6e 70 | 75 74 20 61 72 65 61 20 |tive inp|ut area |
|00005000| 72 65 6c 61 74 69 76 65 | 20 74 6f 20 74 68 65 20 |relative| to the |
|00005010| 65 6e 74 69 72 65 20 74 | 65 78 74 20 68 61 6e 64 |entire t|ext hand|
|00005020| 6c 65 3b 20 74 68 65 79 | 20 61 72 65 20 62 6f 74 |le; they| are bot|
|00005030| 68 20 73 65 74 20 74 6f | 20 2d 31 20 69 66 20 74 |h set to| -1 if t|
|00005040| 68 65 72 65 20 69 73 20 | 6e 6f 20 61 63 74 69 76 |here is |no activ|
|00005050| 65 20 69 6e 70 75 74 20 | 61 72 65 61 2e 20 54 68 |e input |area. Th|
|00005060| 65 20 72 65 6d 61 69 6e | 69 6e 67 20 70 61 72 61 |e remain|ing para|
|00005070| 6d 65 74 65 72 73 20 61 | 72 65 20 61 20 73 75 62 |meters a|re a sub|
|00005080| 73 65 74 20 6f 66 20 74 | 68 65 20 70 61 72 61 6d |set of t|he param|
|00005090| 65 74 65 72 73 20 66 6f | 72 20 74 68 65 20 55 70 |eters fo|r the Up|
|000050a0| 64 61 74 65 20 41 63 74 | 69 76 65 20 49 6e 70 75 |date Act|ive Inpu|
|000050b0| 74 20 41 72 65 61 20 65 | 76 65 6e 74 2e 20 54 68 |t Area e|vent. Th|
|000050c0| 65 20 66 69 78 4c 65 6e | 20 70 61 72 61 6d 65 74 |e fixLen| paramet|
|000050d0| 65 72 20 69 73 20 74 68 | 65 20 6c 65 6e 67 74 68 |er is th|e length|
|000050e0| 20 6f 66 20 74 68 65 20 | 63 6f 6e 66 69 72 6d 65 | of the |confirme|
|000050f0| 64 20 74 65 78 74 2e 20 | 50 69 6e 53 74 61 72 74 |d text. |PinStart|
|00005100| 20 61 6e 64 20 70 69 6e | 45 6e 64 20 61 72 65 20 | and pin|End are |
|00005110| 74 68 65 20 6f 66 66 73 | 65 74 73 20 6f 66 20 74 |the offs|ets of t|
|00005120| 68 65 20 73 74 61 72 74 | 20 61 6e 64 20 65 6e 64 |he start| and end|
|00005130| 20 6f 66 20 74 68 65 20 | 74 65 78 74 20 72 61 6e | of the |text ran|
|00005140| 67 65 20 74 68 61 74 20 | 73 68 6f 75 6c 64 20 62 |ge that |should b|
|00005150| 65 20 69 6e 20 76 69 65 | 77 2e 0d 43 6f 6d 6d 6f |e in vie|w..Commo|
|00005160| 6e 20 75 73 65 73 20 6f | 66 20 74 68 65 20 70 6f |n uses o|f the po|
|00005170| 73 74 2d 75 70 64 61 74 | 65 20 72 6f 75 74 69 6e |st-updat|e routin|
|00005180| 65 20 61 72 65 3a 0d a5 | 09 61 64 6a 75 73 74 69 |e are:..|.adjusti|
|00005190| 6e 67 20 73 63 72 6f 6c | 6c 20 62 61 72 73 20 6f |ng scrol|l bars o|
|000051a0| 72 20 69 6e 70 75 74 20 | 66 69 65 6c 64 20 77 69 |r input |field wi|
|000051b0| 64 74 68 73 20 74 6f 20 | 74 68 65 20 77 69 64 74 |dths to |the widt|
|000051c0| 68 20 61 6e 64 20 68 65 | 69 67 68 74 20 6f 66 20 |h and he|ight of |
|000051d0| 74 68 65 20 74 65 78 74 | 2c 20 77 68 69 63 68 20 |the text|, which |
|000051e0| 6d 61 79 20 68 61 76 65 | 20 63 68 61 6e 67 65 64 |may have| changed|
|000051f0| 20 64 75 72 69 6e 67 20 | 65 64 69 74 69 6e 67 2c | during |editing,|
|00005200| 0d a5 09 73 65 74 74 69 | 6e 67 20 61 20 d2 6d 6f |...setti|ng a .mo|
|00005210| 64 69 66 69 65 64 d3 20 | 66 6c 61 67 20 66 6f 72 |dified. |flag for|
|00005220| 20 74 68 65 20 64 6f 63 | 75 6d 65 6e 74 2c 0d a5 | the doc|ument,..|
|00005230| 09 73 61 76 69 6e 67 20 | 69 6e 66 6f 72 6d 61 74 |.saving |informat|
|00005240| 69 6f 6e 20 61 62 6f 75 | 74 20 74 68 65 20 74 65 |ion abou|t the te|
|00005250| 78 74 20 62 65 69 6e 67 | 20 65 6e 74 65 72 65 64 |xt being| entered|
|00005260| 20 66 6f 72 20 55 6e 64 | 6f 20 61 6e 64 20 52 65 | for Und|o and Re|
|00005270| 64 6f 2c 0d a5 09 6b 65 | 65 70 69 6e 67 20 74 72 |do,...ke|eping tr|
|00005280| 61 63 6b 20 6f 66 20 77 | 68 65 74 68 65 72 20 74 |ack of w|hether t|
|00005290| 68 65 72 65 d5 73 20 61 | 6e 20 61 63 74 69 76 65 |here.s a|n active|
|000052a0| 20 69 6e 70 75 74 20 61 | 72 65 61 2e 0d 43 61 6c | input a|rea..Cal|
|000052b0| 6c 69 6e 67 20 46 69 78 | 54 53 4d 44 6f 63 75 6d |ling Fix|TSMDocum|
|000052c0| 65 6e 74 0d 54 68 65 20 | 46 69 78 54 53 4d 44 6f |ent.The |FixTSMDo|
|000052d0| 63 75 6d 65 6e 74 20 72 | 6f 75 74 69 6e 65 20 73 |cument r|outine s|
|000052e0| 68 6f 75 6c 64 20 62 65 | 20 63 61 6c 6c 65 64 20 |hould be| called |
|000052f0| 77 68 65 6e 65 76 65 72 | 20 74 68 65 20 75 73 65 |whenever| the use|
|00005300| 72 20 73 77 69 74 63 68 | 65 73 20 66 72 6f 6d 20 |r switch|es from |
|00005310| 74 79 70 69 6e 67 20 74 | 6f 20 61 20 64 69 66 66 |typing t|o a diff|
|00005320| 65 72 65 6e 74 20 6b 69 | 6e 64 20 6f 66 20 61 63 |erent ki|nd of ac|
|00005330| 74 69 76 69 74 79 20 74 | 68 61 74 20 6f 70 65 72 |tivity t|hat oper|
|00005340| 61 74 65 73 20 6f 6e 20 | 74 68 65 20 74 65 78 74 |ates on |the text|
|00005350| 2c 20 65 2e 67 2e 2c 20 | 69 6e 69 74 69 61 74 69 |, e.g., |initiati|
|00005360| 6e 67 20 61 6e 20 65 64 | 69 74 69 6e 67 20 63 6f |ng an ed|iting co|
|00005370| 6d 6d 61 6e 64 20 66 72 | 6f 6d 20 74 68 65 20 6d |mmand fr|om the m|
|00005380| 65 6e 75 20 6f 72 20 73 | 65 6c 65 63 74 69 6e 67 |enu or s|electing|
|00005390| 20 74 65 78 74 2e 20 49 | 74 20 73 68 6f 75 6c 64 | text. I|t should|
|000053a0| 20 6e 6f 74 20 62 65 20 | 63 61 6c 6c 65 64 20 66 | not be |called f|
|000053b0| 6f 72 20 61 63 74 69 6f | 6e 73 20 74 68 61 74 20 |or actio|ns that |
|000053c0| 77 6f 75 6c 64 20 6e 6f | 74 20 62 65 20 63 6f 6e |would no|t be con|
|000053d0| 73 69 64 65 72 65 64 20 | 69 6e 74 65 72 72 75 70 |sidered |interrup|
|000053e0| 74 69 6e 67 20 61 20 74 | 79 70 69 6e 67 20 73 65 |ting a t|yping se|
|000053f0| 71 75 65 6e 63 65 2c 20 | 65 2e 67 2e 2c 20 72 65 |quence, |e.g., re|
|00005400| 73 69 7a 69 6e 67 20 6f | 72 20 73 63 72 6f 6c 6c |sizing o|r scroll|
|00005410| 69 6e 67 20 74 68 65 20 | 77 69 6e 64 6f 77 2e 20 |ing the |window. |
|00005420| 54 68 65 72 65 20 61 72 | 65 20 73 6f 6d 65 20 61 |There ar|e some a|
|00005430| 63 74 69 6f 6e 73 20 69 | 6e 20 62 65 74 77 65 65 |ctions i|n betwee|
|00005440| 6e 20 66 6f 72 20 77 68 | 69 63 68 20 77 65 20 64 |n for wh|ich we d|
|00005450| 6f 6e d5 74 20 68 61 76 | 65 20 63 6c 65 61 72 20 |on.t hav|e clear |
|00005460| 67 75 69 64 65 6c 69 6e | 65 73 20 79 65 74 3b 20 |guidelin|es yet; |
|00005470| 69 6e 20 74 68 65 73 65 | 20 63 61 73 65 73 20 75 |in these| cases u|
|00005480| 73 65 20 79 6f 75 72 20 | 62 65 73 74 20 6a 75 64 |se your |best jud|
|00005490| 67 6d 65 6e 74 2e 0d 54 | 53 4d 54 45 20 77 69 6c |gment..T|SMTE wil|
|000054a0| 6c 20 69 6e 20 73 6f 6d | 65 20 63 61 73 65 73 20 |l in som|e cases |
|000054b0| 64 65 74 65 63 74 20 74 | 68 61 74 20 46 69 78 54 |detect t|hat FixT|
|000054c0| 53 4d 44 6f 63 75 6d 65 | 6e 74 20 6e 65 65 64 73 |SMDocume|nt needs|
|000054d0| 20 74 6f 20 62 65 20 63 | 61 6c 6c 65 64 20 61 6e | to be c|alled an|
|000054e0| 64 20 64 6f 20 69 74 20 | 66 6f 72 20 79 6f 75 2c |d do it |for you,|
|000054f0| 20 65 2e 67 2e 2c 20 77 | 68 65 6e 20 74 68 65 20 | e.g., w|hen the |
|00005500| 75 73 65 72 20 63 6c 69 | 63 6b 73 20 69 6e 74 6f |user cli|cks into|
|00005510| 20 61 20 70 61 72 74 20 | 6f 66 20 74 68 65 20 64 | a part |of the d|
|00005520| 6f 63 75 6d 65 6e 74 20 | 6f 75 74 73 69 64 65 20 |ocument |outside |
|00005530| 74 68 65 20 69 6e 70 75 | 74 20 61 72 65 61 2e 20 |the inpu|t area. |
|00005540| 49 6e 20 6d 6f 73 74 20 | 63 61 73 65 73 20 68 6f |In most |cases ho|
|00005550| 77 65 76 65 72 20 69 74 | 20 69 73 20 79 6f 75 72 |wever it| is your|
|00005560| 20 72 65 73 70 6f 6e 73 | 69 62 69 6c 69 74 79 20 | respons|ibility |
|00005570| 74 6f 20 63 61 6c 6c 20 | 46 69 78 54 53 4d 44 6f |to call |FixTSMDo|
|00005580| 63 75 6d 65 6e 74 20 77 | 68 65 6e 20 61 70 70 72 |cument w|hen appr|
|00005590| 6f 70 72 69 61 74 65 3a | 20 77 68 65 6e 20 74 68 |opriate:| when th|
|000055a0| 65 20 75 73 65 72 20 73 | 65 6c 65 63 74 73 20 61 |e user s|elects a|
|000055b0| 6e 20 65 64 69 74 69 6e | 67 20 63 6f 6d 6d 61 6e |n editin|g comman|
|000055c0| 64 20 66 72 6f 6d 20 74 | 68 65 20 6d 65 6e 75 2c |d from t|he menu,|
|000055d0| 20 63 6c 6f 73 65 73 20 | 61 20 64 6f 63 75 6d 65 | closes |a docume|
|000055e0| 6e 74 2c 20 73 61 76 65 | 73 20 6f 72 20 70 72 69 |nt, save|s or pri|
|000055f0| 6e 74 73 20 69 74 2e 0d | 55 73 69 6e 67 20 54 53 |nts it..|Using TS|
|00005600| 4d 54 45 20 61 6e 64 20 | 54 65 78 74 45 64 69 74 |MTE and |TextEdit|
|00005610| 20 69 6e 20 41 64 64 69 | 74 69 6f 6e 20 74 6f 20 | in Addi|tion to |
|00005620| 59 6f 75 72 20 4f 77 6e | 20 54 65 78 74 20 45 6e |Your Own| Text En|
|00005630| 67 69 6e 65 0d 49 66 20 | 79 6f 75 20 75 73 65 20 |gine.If |you use |
|00005640| 79 6f 75 72 20 6f 77 6e | 20 74 65 78 74 20 65 6e |your own| text en|
|00005650| 67 69 6e 65 20 69 6e 20 | 61 64 64 69 74 69 6f 6e |gine in |addition|
|00005660| 20 74 6f 20 54 65 78 74 | 45 64 69 74 2c 20 79 6f | to Text|Edit, yo|
|00005670| 75 20 77 69 6c 6c 20 68 | 61 76 65 20 74 6f 20 70 |u will h|ave to p|
|00005680| 72 6f 76 69 64 65 20 79 | 6f 75 72 20 6f 77 6e 20 |rovide y|our own |
|00005690| 41 70 70 6c 65 20 65 76 | 65 6e 74 20 68 61 6e 64 |Apple ev|ent hand|
|000056a0| 6c 65 72 73 20 66 6f 72 | 20 74 68 65 20 54 65 78 |lers for| the Tex|
|000056b0| 74 20 53 65 72 76 69 63 | 65 73 20 41 70 70 6c 65 |t Servic|es Apple|
|000056c0| 20 65 76 65 6e 74 73 20 | 74 6f 20 69 6d 70 6c 65 | events |to imple|
|000056d0| 6d 65 6e 74 20 69 6e 6c | 69 6e 65 20 69 6e 70 75 |ment inl|ine inpu|
|000056e0| 74 20 66 6f 72 20 79 6f | 75 72 20 65 6e 67 69 6e |t for yo|ur engin|
|000056f0| 65 2e 20 48 6f 77 65 76 | 65 72 2c 20 79 6f 75 20 |e. Howev|er, you |
|00005700| 63 61 6e 20 73 74 69 6c | 6c 20 75 73 65 20 54 53 |can stil|l use TS|
|00005710| 4d 54 45 20 74 6f 20 70 | 72 6f 76 69 64 65 20 69 |MTE to p|rovide i|
|00005720| 6e 6c 69 6e 65 20 69 6e | 70 75 74 20 77 68 65 72 |nline in|put wher|
|00005730| 65 76 65 72 20 79 6f 75 | 20 75 73 65 20 54 65 78 |ever you| use Tex|
|00005740| 74 45 64 69 74 20 69 6e | 20 79 6f 75 72 20 61 70 |tEdit in| your ap|
|00005750| 70 6c 69 63 61 74 69 6f | 6e 2e 0d 59 6f 75 72 20 |plicatio|n..Your |
|00005760| 41 70 70 6c 65 20 65 76 | 65 6e 74 20 68 61 6e 64 |Apple ev|ent hand|
|00005770| 6c 65 72 73 20 64 6f 6e | d5 74 20 6e 65 65 64 20 |lers don|.t need |
|00005780| 74 6f 20 77 6f 72 72 79 | 20 61 62 6f 75 74 20 54 |to worry| about T|
|00005790| 65 78 74 45 64 69 74 20 | 61 74 20 61 6c 6c 2e 20 |extEdit |at all. |
|000057a0| 54 53 4d 54 45 20 69 6e | 73 74 61 6c 6c 73 20 69 |TSMTE in|stalls i|
|000057b0| 74 73 20 65 76 65 6e 74 | 20 68 61 6e 64 6c 65 72 |ts event| handler|
|000057c0| 73 20 69 6e 20 74 68 65 | 20 73 79 73 74 65 6d 20 |s in the| system |
|000057d0| 68 65 61 70 2c 20 73 6f | 20 79 6f 75 20 63 61 6e |heap, so| you can|
|000057e0| 20 69 6e 73 74 61 6c 6c | 20 79 6f 75 72 20 68 61 | install| your ha|
|000057f0| 6e 64 6c 65 72 73 20 69 | 6e 20 74 68 65 20 61 70 |ndlers i|n the ap|
|00005800| 70 6c 69 63 61 74 69 6f | 6e 20 68 65 61 70 2e 20 |plicatio|n heap. |
|00005810| 54 68 65 20 73 75 70 70 | 6f 72 74 65 64 20 69 6e |The supp|orted in|
|00005820| 74 65 72 66 61 63 65 20 | 74 79 70 65 20 74 68 61 |terface |type tha|
|00005830| 74 20 79 6f 75 20 73 70 | 65 63 69 66 79 20 77 68 |t you sp|ecify wh|
|00005840| 65 6e 20 79 6f 75 20 63 | 72 65 61 74 65 20 61 20 |en you c|reate a |
|00005850| 54 53 4d 20 64 6f 63 75 | 6d 65 6e 74 20 69 73 20 |TSM docu|ment is |
|00005860| 75 73 65 64 20 74 6f 20 | 61 72 62 69 74 72 61 74 |used to |arbitrat|
|00005870| 65 20 62 65 74 77 65 65 | 6e 20 74 68 65 20 68 61 |e betwee|n the ha|
|00005880| 6e 64 6c 65 72 73 3a 20 | 66 6f 72 20 54 53 4d 20 |ndlers: |for TSM |
|00005890| 64 6f 63 75 6d 65 6e 74 | 73 20 74 68 61 74 20 77 |document|s that w|
|000058a0| 65 72 65 20 63 72 65 61 | 74 65 64 20 77 69 74 68 |ere crea|ted with|
|000058b0| 20 6b 54 53 4d 54 45 49 | 6e 74 65 72 66 61 63 65 | kTSMTEI|nterface|
|000058c0| 54 79 70 65 2c 20 74 68 | 65 20 54 53 4d 54 45 20 |Type, th|e TSMTE |
|000058d0| 68 61 6e 64 6c 65 72 73 | 20 61 72 65 20 63 61 6c |handlers| are cal|
|000058e0| 6c 65 64 2c 20 66 6f 72 | 20 74 68 6f 73 65 20 74 |led, for| those t|
|000058f0| 68 61 74 20 20 77 65 72 | 65 20 63 72 65 61 74 65 |hat wer|e create|
|00005900| 64 20 77 69 74 68 20 6b | 54 65 78 74 53 65 72 76 |d with k|TextServ|
|00005910| 69 63 65 2c 20 79 6f 75 | 72 20 68 61 6e 64 6c 65 |ice, you|r handle|
|00005920| 72 73 2e 0d 54 68 65 20 | 6f 6e 6c 79 20 74 68 69 |rs..The |only thi|
|00005930| 6e 67 20 79 6f 75 20 68 | 61 76 65 20 74 6f 20 77 |ng you h|ave to w|
|00005940| 6f 72 72 79 20 61 62 6f | 75 74 20 69 73 20 77 68 |orry abo|ut is wh|
|00005950| 61 74 20 74 6f 20 64 6f | 20 69 66 20 74 68 65 20 |at to do| if the |
|00005960| 54 65 78 74 20 53 65 72 | 76 69 63 65 73 20 4d 61 |Text Ser|vices Ma|
|00005970| 6e 61 67 65 72 20 69 73 | 20 61 76 61 69 6c 61 62 |nager is| availab|
|00005980| 6c 65 2c 20 62 75 74 20 | 6e 6f 74 20 54 53 4d 54 |le, but |not TSMT|
|00005990| 45 2c 20 73 6f 20 74 68 | 61 74 20 79 6f 75 20 63 |E, so th|at you c|
|000059a0| 61 6e 20 70 72 6f 76 69 | 64 65 20 69 6e 6c 69 6e |an provi|de inlin|
|000059b0| 65 20 69 6e 70 75 74 20 | 66 6f 72 20 79 6f 75 72 |e input |for your|
|000059c0| 20 65 6e 67 69 6e 65 2c | 20 62 75 74 20 6e 6f 74 | engine,| but not|
|000059d0| 20 66 6f 72 20 54 65 78 | 74 45 64 69 74 2e 20 49 | for Tex|tEdit. I|
|000059e0| 6e 20 74 68 69 73 20 63 | 61 73 65 20 79 6f 75 20 |n this c|ase you |
|000059f0| 77 61 6e 74 20 74 6f 20 | 6d 61 6b 65 20 73 75 72 |want to |make sur|
|00005a00| 65 20 74 68 61 74 20 69 | 6e 6c 69 6e 65 20 69 6e |e that i|nline in|
|00005a10| 70 75 74 20 69 73 20 75 | 73 65 64 20 77 68 65 6e |put is u|sed when|
|00005a20| 65 76 65 72 20 79 6f 75 | 72 20 65 6e 67 69 6e 65 |ever you|r engine|
|00005a30| 20 69 73 20 61 63 74 69 | 76 65 2c 20 62 75 74 20 | is acti|ve, but |
|00005a40| 74 68 61 74 20 61 20 66 | 6c 6f 61 74 69 6e 67 20 |that a f|loating |
|00005a50| 69 6e 70 75 74 20 77 69 | 6e 64 6f 77 20 69 73 20 |input wi|ndow is |
|00005a60| 6d 61 64 65 20 61 76 61 | 69 6c 61 62 6c 65 20 77 |made ava|ilable w|
|00005a70| 68 65 6e 65 76 65 72 20 | 61 20 54 65 78 74 45 64 |henever |a TextEd|
|00005a80| 69 74 20 66 69 65 6c 64 | 20 69 73 20 61 63 74 69 |it field| is acti|
|00005a90| 76 65 20 28 77 69 74 68 | 6f 75 74 20 74 68 65 20 |ve (with|out the |
|00005aa0| 66 6c 6f 61 74 69 6e 67 | 20 69 6e 70 75 74 20 77 |floating| input w|
|00005ab0| 69 6e 64 6f 77 20 75 73 | 65 72 73 20 77 6f 75 6c |indow us|ers woul|
|00005ac0| 64 20 6e 6f 74 20 62 65 | 20 61 62 6c 65 20 74 6f |d not be| able to|
|00005ad0| 20 74 79 70 65 20 61 6e | 79 74 68 69 6e 67 20 6d | type an|ything m|
|00005ae0| 65 61 6e 69 6e 67 66 75 | 6c 20 69 6e 20 61 20 32 |eaningfu|l in a 2|
|00005af0| 2d 62 79 74 65 20 73 63 | 72 69 70 74 29 2e 20 59 |-byte sc|ript). Y|
|00005b00| 6f 75 20 63 61 6e 20 64 | 6f 20 74 68 69 73 20 62 |ou can d|o this b|
|00005b10| 79 20 63 61 6c 6c 69 6e | 67 20 55 73 65 49 6e 70 |y callin|g UseInp|
|00005b20| 75 74 57 69 6e 64 6f 77 | 20 77 68 65 6e 65 76 65 |utWindow| wheneve|
|00005b30| 72 20 79 6f 75 20 61 63 | 74 69 76 61 74 65 20 6f |r you ac|tivate o|
|00005b40| 72 20 64 65 61 63 74 69 | 76 61 74 65 20 61 20 54 |r deacti|vate a T|
|00005b50| 65 78 74 45 64 69 74 20 | 72 65 63 6f 72 64 20 d0 |extEdit |record .|
|00005b60| 20 68 65 72 65 20 69 73 | 20 73 61 6d 70 6c 65 20 | here is| sample |
|00005b70| 63 6f 64 65 20 66 6f 72 | 20 61 63 74 69 76 61 74 |code for| activat|
|00005b80| 69 6f 6e 3a 0d 69 66 20 | 28 64 6f 63 2d 3e 64 6f |ion:.if |(doc->do|
|00005b90| 63 54 53 4d 44 6f 63 20 | 21 3d 20 6e 69 6c 29 0d |cTSMDoc |!= nil).|
|00005ba0| 09 43 68 65 63 6b 45 72 | 72 6f 72 28 41 63 74 69 |.CheckEr|ror(Acti|
|00005bb0| 76 61 74 65 54 53 4d 44 | 6f 63 75 6d 65 6e 74 28 |vateTSMD|ocument(|
|00005bc0| 64 6f 63 2d 3e 64 6f 63 | 54 53 4d 44 6f 63 29 29 |doc->doc|TSMDoc))|
|00005bd0| 3b 0d 65 6c 73 65 0d 09 | 43 68 65 63 6b 45 72 72 |;.else..|CheckErr|
|00005be0| 6f 72 28 55 73 65 49 6e | 70 75 74 57 69 6e 64 6f |or(UseIn|putWindo|
|00005bf0| 77 28 6e 69 6c 2c 20 74 | 72 75 65 29 29 3b 0d 4d |w(nil, t|rue));.M|
|00005c00| 6f 72 65 20 49 6e 6c 69 | 6e 65 20 49 6e 70 75 74 |ore Inli|ne Input|
|00005c10| 20 41 64 76 69 63 65 0d | 54 68 69 73 20 73 65 63 | Advice.|This sec|
|00005c20| 74 69 6f 6e 20 63 6f 6e | 74 61 69 6e 73 20 73 6f |tion con|tains so|
|00005c30| 6d 65 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 74 |me infor|mation t|
|00005c40| 68 61 74 20 69 73 20 6e | 6f 74 20 73 70 65 63 69 |hat is n|ot speci|
|00005c50| 66 69 63 20 74 6f 20 54 | 53 4d 54 45 2c 20 62 75 |fic to T|SMTE, bu|
|00005c60| 74 20 61 70 70 6c 69 65 | 73 20 74 6f 20 61 6c 6c |t applie|s to all|
|00005c70| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 73 20 74 68 | applica|tions th|
|00005c80| 61 74 20 75 73 65 20 74 | 68 65 20 54 65 78 74 20 |at use t|he Text |
|00005c90| 53 65 72 76 69 63 65 73 | 20 4d 61 6e 61 67 65 72 |Services| Manager|
|00005ca0| 20 69 6e 20 61 6e 79 20 | 66 6f 72 6d 2e 20 49 74 | in any |form. It|
|00005cb0| 20 73 68 6f 77 73 20 77 | 6f 72 6b 61 72 6f 75 6e | shows w|orkaroun|
|00005cc0| 64 73 20 66 6f 72 20 73 | 6f 6d 65 20 75 6e 65 78 |ds for s|ome unex|
|00005cd0| 70 65 63 74 65 64 20 66 | 65 61 74 75 72 65 73 20 |pected f|eatures |
|00005ce0| 28 77 65 20 77 6f 6e d5 | 74 20 75 73 65 20 65 6e |(we won.|t use en|
|00005cf0| 74 6f 6d 6f 6c 6f 67 69 | 63 61 6c 20 74 65 72 6d |tomologi|cal term|
|00005d00| 69 6e 6f 6c 6f 67 79 20 | 68 65 72 65 c9 29 20 69 |inology |here.) i|
|00005d10| 6e 20 74 68 65 20 54 65 | 78 74 20 53 65 72 76 69 |n the Te|xt Servi|
|00005d20| 63 65 73 20 4d 61 6e 61 | 67 65 72 20 61 6e 64 20 |ces Mana|ger and |
|00005d30| 66 69 72 73 74 2d 67 65 | 6e 65 72 61 74 69 6f 6e |first-ge|neration|
|00005d40| 20 69 6e 70 75 74 20 6d | 65 74 68 6f 64 73 20 77 | input m|ethods w|
|00005d50| 72 69 74 74 65 6e 20 66 | 6f 72 20 69 74 2e 20 53 |ritten f|or it. S|
|00005d60| 6f 6d 65 20 6f 66 20 74 | 68 6f 73 65 20 75 6e 65 |ome of t|hose une|
|00005d70| 78 70 65 63 74 65 64 20 | 66 65 61 74 75 72 65 73 |xpected |features|
|00005d80| 20 61 72 65 20 65 78 70 | 65 63 74 65 64 20 74 6f | are exp|ected to|
|00005d90| 20 62 65 20 6f 72 20 68 | 61 76 65 20 61 6c 72 65 | be or h|ave alre|
|00005da0| 61 64 79 20 62 65 65 6e | 20 64 69 73 63 6f 6e 74 |ady been| discont|
|00005db0| 69 6e 75 65 64 20 69 6e | 20 6e 65 77 65 72 20 76 |inued in| newer v|
|00005dc0| 65 72 73 69 6f 6e 73 2e | 0d 49 6e 63 6f 72 72 65 |ersions.|.Incorre|
|00005dd0| 63 74 20 44 65 63 6c 61 | 72 61 74 69 6f 6e 20 69 |ct Decla|ration i|
|00005de0| 6e 20 54 65 78 74 53 65 | 72 76 69 63 65 73 2e 70 |n TextSe|rvices.p|
|00005df0| 0d 54 68 65 20 54 65 78 | 74 20 53 65 72 76 69 63 |.The Tex|t Servic|
|00005e00| 65 73 20 69 6e 74 65 72 | 66 61 63 65 20 66 69 6c |es inter|face fil|
|00005e10| 65 20 54 65 78 74 53 65 | 72 76 69 63 65 73 2e 70 |e TextSe|rvices.p|
|00005e20| 20 74 68 61 74 20 69 73 | 20 63 75 72 72 65 6e 74 | that is| current|
|00005e30| 6c 79 20 64 69 73 74 72 | 69 62 75 74 65 64 20 6f |ly distr|ibuted o|
|00005e40| 6e 20 45 2e 54 2e 4f 2e | 20 31 32 20 61 6e 64 20 |n E.T.O.| 12 and |
|00005e50| 74 68 65 20 4e 6f 76 65 | 6d 62 65 72 20 31 39 39 |the Nove|mber 199|
|00005e60| 33 20 44 65 76 65 6c 6f | 70 65 72 20 43 44 20 63 |3 Develo|per CD c|
|00005e70| 6f 6e 74 61 69 6e 73 20 | 61 6e 20 69 6e 63 6f 72 |ontains |an incor|
|00005e80| 72 65 63 74 20 64 65 63 | 6c 61 72 61 74 69 6f 6e |rect dec|laration|
|00005e90| 20 66 6f 72 20 4e 65 77 | 54 53 4d 44 6f 63 75 6d | for New|TSMDocum|
|00005ea0| 65 6e 74 2e 20 54 68 65 | 20 64 65 63 6c 61 72 61 |ent. The| declara|
|00005eb0| 74 69 6f 6e 20 73 68 6f | 75 6c 64 20 72 65 61 64 |tion sho|uld read|
|00005ec0| 3a 0d 46 75 6e 63 74 69 | 6f 6e 20 4e 65 77 54 53 |:.Functi|on NewTS|
|00005ed0| 4d 44 6f 63 75 6d 65 6e | 74 28 6e 75 6d 4f 66 49 |MDocumen|t(numOfI|
|00005ee0| 6e 74 65 72 66 61 63 65 | 3a 20 49 6e 74 65 67 65 |nterface|: Intege|
|00005ef0| 72 3b 0d 09 09 56 41 52 | 20 73 75 70 70 6f 72 74 |r;...VAR| support|
|00005f00| 65 64 49 6e 74 65 72 66 | 61 63 65 54 79 70 65 73 |edInterf|aceTypes|
|00005f10| 3a 20 49 6e 74 65 72 66 | 61 63 65 54 79 70 65 4c |: Interf|aceTypeL|
|00005f20| 69 73 74 3b 20 56 41 52 | 20 69 64 6f 63 49 44 3a |ist; VAR| idocID:|
|00005f30| 20 54 53 4d 44 6f 63 75 | 6d 65 6e 74 49 44 3b 20 | TSMDocu|mentID; |
|00005f40| 09 09 72 65 66 43 6f 6e | 3a 20 4c 6f 6e 67 69 6e |..refCon|: Longin|
|00005f50| 74 29 3a 20 4f 53 45 72 | 72 3b 0d 09 49 4e 4c 49 |t): OSEr|r;..INLI|
|00005f60| 4e 45 20 24 33 30 33 43 | 2c 20 24 30 30 30 30 2c |NE $303C|, $0000,|
|00005f70| 20 24 41 41 35 34 3b 0d | 57 69 74 68 6f 75 74 20 | $AA54;.|Without |
|00005f80| 74 68 65 20 6b 65 79 77 | 6f 72 64 20 d2 76 61 72 |the keyw|ord .var|
|00005f90| d3 20 69 6e 20 66 72 6f | 6e 74 20 6f 66 20 d2 73 |. in fro|nt of .s|
|00005fa0| 75 70 70 6f 72 74 65 64 | 49 6e 74 65 72 66 61 63 |upported|Interfac|
|00005fb0| 65 54 79 70 65 73 d3 2c | 20 79 6f 75 72 20 61 70 |eTypes.,| your ap|
|00005fc0| 70 6c 69 63 61 74 69 6f | 6e 20 77 69 6c 6c 20 65 |plicatio|n will e|
|00005fd0| 6e 63 6f 75 6e 74 65 72 | 20 61 20 62 75 73 20 65 |ncounter| a bus e|
|00005fe0| 72 72 6f 72 20 69 6e 20 | 4e 65 77 54 53 4d 44 6f |rror in |NewTSMDo|
|00005ff0| 63 75 6d 65 6e 74 2e 20 | 53 6f 2c 20 67 6f 20 69 |cument. |So, go i|
|00006000| 6e 20 61 6e 64 20 61 64 | 64 20 74 68 65 20 6b 65 |n and ad|d the ke|
|00006010| 79 77 6f 72 64 20 d2 76 | 61 72 d3 20 69 66 20 69 |yword .v|ar. if i|
|00006020| 74 d5 73 20 6e 6f 74 20 | 74 68 65 72 65 2e 0d 54 |t.s not |there..T|
|00006030| 68 65 20 64 65 63 6c 61 | 72 61 74 69 6f 6e 20 66 |he decla|ration f|
|00006040| 6f 72 20 4e 65 77 54 53 | 4d 44 6f 63 75 6d 65 6e |or NewTS|MDocumen|
|00006050| 74 20 69 6e 20 54 65 78 | 74 53 65 72 76 69 63 65 |t in Tex|tService|
|00006060| 73 2e 68 20 69 73 20 63 | 6f 72 72 65 63 74 2e 0d |s.h is c|orrect..|
|00006070| 44 65 6c 65 74 65 54 53 | 4d 44 6f 63 75 6d 65 6e |DeleteTS|MDocumen|
|00006080| 74 20 55 73 65 73 20 44 | 69 73 70 6f 73 65 64 20 |t Uses D|isposed |
|00006090| 48 61 6e 64 6c 65 0d 49 | 66 20 61 20 54 53 4d 44 |Handle.I|f a TSMD|
|000060a0| 6f 63 75 6d 65 6e 74 20 | 69 73 20 64 65 6c 65 74 |ocument |is delet|
|000060b0| 65 64 20 77 69 74 68 6f | 75 74 20 62 65 69 6e 67 |ed witho|ut being|
|000060c0| 20 64 65 61 63 74 69 76 | 61 74 65 64 20 66 69 72 | deactiv|ated fir|
|000060d0| 73 74 2c 20 74 68 65 20 | 72 6f 75 74 69 6e 65 20 |st, the |routine |
|000060e0| 44 65 6c 65 74 65 54 53 | 4d 44 6f 63 75 6d 65 6e |DeleteTS|MDocumen|
|000060f0| 74 20 6d 61 79 20 72 65 | 75 73 65 20 61 20 68 61 |t may re|use a ha|
|00006100| 6e 64 6c 65 20 74 68 61 | 74 20 69 74 20 68 61 73 |ndle tha|t it has|
|00006110| 20 61 6c 72 65 61 64 79 | 20 64 69 73 70 6f 73 65 | already| dispose|
|00006120| 64 20 6f 66 2e 20 49 74 | 20 64 65 72 65 66 65 72 |d of. It| derefer|
|00006130| 65 6e 63 65 73 20 74 68 | 69 73 20 68 61 6e 64 6c |ences th|is handl|
|00006140| 65 20 61 6e 64 20 77 72 | 69 74 65 73 20 61 20 73 |e and wr|ites a s|
|00006150| 69 6e 67 6c 65 20 62 79 | 74 65 2e 20 54 68 69 73 |ingle by|te. This|
|00006160| 20 6d 61 79 20 65 76 65 | 6e 74 75 61 6c 6c 79 20 | may eve|ntually |
|00006170| 63 61 75 73 65 20 79 6f | 75 72 20 61 70 70 6c 69 |cause yo|ur appli|
|00006180| 63 61 74 69 6f 6e 20 74 | 6f 20 63 72 61 73 68 20 |cation t|o crash |
|00006190| 6d 79 73 74 65 72 69 6f | 75 73 6c 79 2e 0d 57 6f |mysterio|usly..Wo|
|000061a0| 72 6b 61 72 6f 75 6e 64 | 3a 20 6d 61 6b 65 20 73 |rkaround|: make s|
|000061b0| 75 72 65 20 74 6f 20 64 | 65 61 63 74 69 76 61 74 |ure to d|eactivat|
|000061c0| 65 20 65 61 63 68 20 54 | 53 4d 20 64 6f 63 75 6d |e each T|SM docum|
|000061d0| 65 6e 74 20 75 73 69 6e | 67 20 44 65 61 63 74 69 |ent usin|g Deacti|
|000061e0| 76 61 74 65 54 53 4d 44 | 6f 63 75 6d 65 6e 74 20 |vateTSMD|ocument |
|000061f0| 62 65 66 6f 72 65 20 63 | 61 6c 6c 69 6e 67 20 44 |before c|alling D|
|00006200| 65 6c 65 74 65 54 53 4d | 44 6f 63 75 6d 65 6e 74 |eleteTSM|Document|
|00006210| 20 74 6f 20 64 65 6c 65 | 74 65 20 69 74 2e 20 49 | to dele|te it. I|
|00006220| 66 20 54 53 4d 54 45 20 | 63 61 6c 6c 73 20 44 65 |f TSMTE |calls De|
|00006230| 6c 65 74 65 54 53 4d 44 | 6f 63 75 6d 65 6e 74 20 |leteTSMD|ocument |
|00006240| 66 6f 72 20 61 20 54 53 | 4d 20 64 6f 63 75 6d 65 |for a TS|M docume|
|00006250| 6e 74 20 69 74 20 63 72 | 65 61 74 65 64 20 66 6f |nt it cr|eated fo|
|00006260| 72 20 61 20 6d 6f 64 61 | 6c 20 64 69 61 6c 6f 67 |r a moda|l dialog|
|00006270| 20 69 74 20 64 6f 65 73 | 20 74 68 65 20 72 69 67 | it does| the rig|
|00006280| 68 74 20 74 68 69 6e 67 | 2e 0d 41 63 74 69 76 61 |ht thing|..Activa|
|00006290| 74 65 54 53 4d 44 6f 63 | 75 6d 65 6e 74 20 4d 75 |teTSMDoc|ument Mu|
|000062a0| 73 74 20 42 65 20 43 61 | 6c 6c 65 64 20 46 72 6f |st Be Ca|lled Fro|
|000062b0| 6d 20 46 6f 72 65 67 72 | 6f 75 6e 64 0d 41 63 74 |m Foregr|ound.Act|
|000062c0| 69 76 61 74 65 54 53 4d | 44 6f 63 75 6d 65 6e 74 |ivateTSM|Document|
|000062d0| 20 64 6f 65 73 20 6e 6f | 74 20 77 6f 72 6b 20 70 | does no|t work p|
|000062e0| 72 6f 70 65 72 6c 79 20 | 69 66 20 63 61 6c 6c 65 |roperly |if calle|
|000062f0| 64 20 66 72 6f 6d 20 74 | 68 65 20 62 61 63 6b 67 |d from t|he backg|
|00006300| 72 6f 75 6e 64 2e 20 57 | 68 65 6e 20 61 20 77 69 |round. W|hen a wi|
|00006310| 6e 64 6f 77 20 74 68 61 | 74 20 6f 77 6e 73 20 61 |ndow tha|t owns a|
|00006320| 20 54 53 4d 20 64 6f 63 | 75 6d 65 6e 74 20 69 73 | TSM doc|ument is|
|00006330| 20 63 6f 6d 69 6e 67 20 | 74 6f 20 74 68 65 20 66 | coming |to the f|
|00006340| 6f 72 65 67 72 6f 75 6e | 64 20 66 72 6f 6d 20 74 |oregroun|d from t|
|00006350| 68 65 20 62 61 63 6b 67 | 72 6f 75 6e 64 2c 20 79 |he backg|round, y|
|00006360| 6f 75 72 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |our appl|ication |
|00006370| 69 73 20 73 75 70 70 6f | 73 65 64 20 74 6f 20 63 |is suppo|sed to c|
|00006380| 61 6c 6c 20 41 63 74 69 | 76 61 74 65 54 53 4d 44 |all Acti|vateTSMD|
|00006390| 6f 63 75 6d 65 6e 74 20 | 77 69 74 68 20 74 68 65 |ocument |with the|
|000063a0| 20 54 53 4d 44 6f 63 75 | 6d 65 6e 74 49 44 20 66 | TSMDocu|mentID f|
|000063b0| 6f 72 20 74 68 61 74 20 | 77 69 6e 64 6f 77 2e 20 |or that |window. |
|000063c0| 20 48 6f 77 65 76 65 72 | 2c 20 69 66 20 79 6f 75 | However|, if you|
|000063d0| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 6d 61 |r applic|ation ma|
|000063e0| 6b 65 73 20 74 68 69 73 | 20 63 61 6c 6c 20 77 68 |kes this| call wh|
|000063f0| 69 6c 65 20 73 74 69 6c | 6c 20 69 6e 20 74 68 65 |ile stil|l in the|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.